Part Number Hot Search : 
SF400 MC145 TD62785F CHA2266 74LVX SMS15T1G GS2GIF TP2510
Product Description
Full Text Search
 

To Download M34551E8-XXXFP Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 To all our customers
Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp.
The semiconductor operations of Hitachi and Mitsubishi Electric were transferred to Renesas Technology Corporation on April 1st 2003. These operations include microcomputer, logic, analog and discrete devices, and memory chips other than DRAMs (flash memory, SRAMs etc.) Accordingly, although Mitsubishi Electric, Mitsubishi Electric Corporation, Mitsubishi Semiconductors, and other Mitsubishi brand names are mentioned in the document, these names have in fact all been changed to Renesas Technology Corp. Thank you for your understanding. Except for our corporate trademark, logo and corporate statement, no changes whatsoever have been made to the contents of the document, and these changes do not constitute any alteration to the contents of the document itself. Note : Mitsubishi Electric will continue the business operations of high frequency & optical devices and power devices.
Renesas Technology Corp. Customer Support Dept. April 1, 2003
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
DESCRIPTION
The 4551 Group is a 4-bit single-chip microcomputer designed with CMOS technology. Its CPU is that of the 4500 series using a simple, high-speed instruction set. The computer is equipped with an 8-bit timer with a reload register, a 14-bit timer which is also used as a watchdog timer, a 4-bit timer with a reload register, a carrier wave output circuit and an LCD control circuit. The mask ROM version and built-in PROM version of 4551 Group are produced as shown in the table below.
FEATURES
q Minimum instruction execution time ............................. 3.0 s (f(XIN)=4.0 MHz, VDD=3.0 V, system clock = f(XIN)/4) q Supply voltage ............................. 2.5 V to 5.5 V (One Time PROM version) ....................................... 2.2 V to 5.5 V (Mask ROM version) q System clock switch function ........................................... Clock divided by 4 or not divided
q LCD control circuit Segment output ................................................................... 20 Common output .................................................................... 4 q Carrier wave frequency switch function System clock, system clock/2, system clock/8, system clock/12, system clock/16, system clock/24, "H" fixed q Timers Timer 1 ................................ 8-bit timer with a reload register Timer 2 ............... 14-bit timer also used as a watchdog timer Timer LC ............................. 4-bit timer with a reload register q Interrupt ................................................................... 3 sources q Voltage drop detection circuit ............................................... 1 q Clock generating circuit (ceramic resonance and quartz-crystal oscillation)
APPLICATION
Remote control transmitter
Product M34551M4-XXXFP
ROM (PROM) size (! 10 bits) 4096 words
RAM size (! 4 bits) 280 words 280 words
Package 48P6S-A 48P6S-A
ROM type Mask ROM One Time PROM
8192 words M34551E8-XXXFP (Note) Note: Shipped after writing (shipped in blank: M34551E8FP)
PIN CONFIGURATION (TOP VIEW)
RESET
24 23 22 21
COM2
COM1
38 37 36 35 34 33 32 31 30 29 28 27 26 25
SEG9 SEG10 SEG11 SEG12 VSS SEG13 SEG14 SEG15 P20 / SEG16 P21 / SEG17
39 40 41 42 43 44 45 46 47 48 1 2 3 4 5 6 7 8 9 10 11 12 13 14
COM3
COM0
SEG8
SEG7
SEG6
SEG5
SEG4
SEG3
SEG2
SEG1
SEG0
M34551M4-XXXFP
D7/XCOUT D6/XCIN CNVSS XOUT XIN VSS VDD CARR D5 / INT D4
M34551M4-XXXFP
20 19 18 17 16 15
P00
P01
P03
P23 / SEG19
P11
P22 / SEG18
P02
P10
P12
P13
D0
D1
D2
Outline 48P6S-A
D3
2
4 4 8
4
BLOCK DIAGRAM
I/O port
Port P1 Port P2 Port D
Port P0
Internal peripheral functions
System clock generating circuit
Timers
Timer 1 (8 bits) Timer 2 (14 bits) Remote control carrier wave output
Timer LC (4 bits)
XIN -XOUT (Main clock) XCIN -XCOUT (Sub-clock)
Memory 4500 Series CPU core
ALU(4 bits)
Register B (4 bits) Register A (4 bits) Register E (8 bits) Register D (3 bits) Stack registers SKs (8 levels) Interrupt stack register SDP(1 level)
ROM (Note)
4096 to 8192 words ! 10 bits
RAM
280 words ! 4 bits (LCD RAM 20 words ! 4 bits included)
LCD drive control circuit (max. 20 segments ! 4 common)
Segment output 4
Common output
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
20
Note: PROM 8192 words ! 10 bits
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
PERFORMANCE OVERVIEW
Parameter Number of basic instructions 92 Function Minimum instruction execution time 1.5 s (f(XIN) = 8.0 MHz:system clock = f(XIN)/4: VDD = 5.0 V) Memory sizes ROM M34551M4 4096 words ! 10 bits RAM D0-D7 M34551E8 8192 words ! 10 bits 280 words ! 4 bits (LCD RAM 20 words ! 4 bits included) Eight independent output ports Output 4-bit I/O port; each pin is equipped with a pull-up function. 4-bit I/O port; each pin is equipped with a pull-up function. 4-bit input port 1-bit output port (CMOS output) 8-bit timer with a reload register 14-bit timer/ Fixed dividing frequency timer 4-bit timer with a reload register 3 (one for external and two for timer) 1 level 8 levels (however, only 7 levels can be used when an interrupt is used or the TABP p instruction is executed)
Input/Output ports
P00-P03 I/O P10-P13 I/O P20-P23 Input Output CARR
Timers
Timer 1 Timer 2/ Watchdog timer Timer LC Sources
Interrupt
Nesting Subroutine nesting LCD
Selective bias value 1/2, 1/3 bias Selective duty value 2, 3, 4 duty 4 Common output 20 Segment output Internal resistor for 200 k ! 3
power supply Device structure Package Operating temperature range Supply voltage Power at active dissipation at clock operating (typical value) at RAM back-up
CMOS silicon gate 48-pin plastic molded QFP -20 C to 70 C 2.2 V to 5.5 V (One Time PROM version: 2.5 V to 5.5 V) 2.5 mA (f(XIN) = 8.0 MHz system clock = f(XIN)/4, VDD=5 V) 27.5 A (at main clock oscillation stop, sub-clock oscillation frequency: 32.0 kHz, VDD=5 V) 0.1 A (at main clock oscillation stop, sub-clock oscillation stop, Ta=25 C, VDD=5V)
DEFINITION OF CLOCK AND CYCLE
q System clock (STCK) The system clock is the basic clock for controlling this product. The system clock can be selected by bits 0 and 3 of the clock control register MR as shown in the table below. Table Selection of system clock Register MR System clock (STCK) MR3 MR0 f(XIN) 0 0 f(XIN)/4 0 f(XCIN)/4 1 1 Note: f(XIN)/4 is selected immediately after system is released from reset. 0 1 1 f(XCIN) q Instruction clock (INSTK) The instruction clock is the standard clock for controlling CPU. The instruction clock is a signal derived from dividing the system clock by 3. The one cycle of the instruction clock is equivalent to the one machine cycle. q Machine cycle The machine cycle is the standard cycle required to execute the instruction.
3
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
PIN DESCRIPTION
Pin VDD VSS CNVSS
RESET
Name Power supply Ground CNVSS Reset input
Input/Output Function -- Connected to a plus power supply. -- Connected to a 0 V power supply. Input I/O Connect CNVSS to VSS and apply "L" (0V) to CNVSS certainly. An N-channel open-drain I/O pin for a system reset. A pull-up resistor is built-in this pin. When the watchdog timer causes the system to be reset or the lowsupply voltage is detected, the RESET pin outputs "L" level.
XIN XOUT D0-D4 D5/INT
Main clock input Main clock output Output port D Output port D
Input Output Output I/O
I/O pins of the main clock generating circuit. A ceramic resonator can be connected between XIN pin and XOUT pin. A feedback resistor is built-in between them. Each pin of port D has an independent 1-bit wide output function. The output structure is N-channel open-drain. 1-bit output port. Port D5 is also used as an INT input pin. When D5/INT pin is used as the INT input pin, set the output latch to "1." The output structure is Nchannel open-drain. Each pin of port D has an independent 1-bit output function. Ports D6 and D7 are also used as pins XCIN and XCOUT for the sub-clock generating circuit, respectively. When pins D6/XCIN and D7/XCOUT are used as the pins for the sub-clock generating circuit, a 32.0 kHz quartz-crystal oscillator can be connected between XCIN pin and XCOUT pin. A feedback resistor is built-in between them. 4-bit I/O port. It can be used as an input port when the output latch is set to "1." The output structure is N-channel open-drain. Every pin of the ports has a key-on wakeup function and a pull-up function.
D6/XCIN
Output port D
I/O
D7/XCOUT
Output port D
Output
P00-P03
I/O port P0
I/O
P10-P13
I/O port P1
I/O
4-bit I/O port. It can be used as an input port when the output latch is set to "1." The output structure is N-channel open-drain. Every pin of the ports has a key-on wakeup function and a pull-up function. Both functions can be switched by software. 4-bit input port. Ports P20-P23 are also used as the segment output pins SEG16- SEG19, respectively. Carrier wave output pin for remote control transmit. The output structure is the CMOS circuit. LCD segment output pins. LCD common output pins. Pins COM0 and COM1 are used at 1/2 duty, pins COM0- COM2 are used at 1/3 duty and pins COM0-COM3 are used at 1/4 duty.
P20/SEG16- Input port P2 P23/SEG19 CARR Carrier wave output for remote control SEG0-SEG15 Segment output COM0-COM3 Common output
I/O Output Output Output
4
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MULTIFUNCTION
Pin D5 D6 D7 P20 P21 INT XCIN XCOUT SEG16 SEG17 Multifunction INT XCIN XCOUT SEG16 Pin D5 D6 D7 P20 P21 P22 P23 Multifunction
SEG17 P22 SEG18 SEG18 P23 SEG19 SEG19 Notes 1: Pins except above have just single function. 2: The port D5 is the output port and ports P20-P23 are the input ports.
CONNECTIONS OF UNUSED PINS
Pin D0-D4 D5/INT D6/XCIN Connection Pin Connect to VSS, or set the output latch to CARR "0" and open. SEG0-SEG15 Select ports D6 and D7 and connect to VSS, COM0-COM3 or set the output latch to "0" and open. P00-P03 Connection Open Open Open Set the output latch to "1" and open. Open or connect to VSS (Note)
D7/XCOUT P 2 0 / S E G 1 6 - P 2 3 / Select port P2 and connect to VSS, or select P10-P13 SEG19 the segment output function and open.
Note: In order to connect ports P10-P13 to VSS, turn off their pull-up transistors (Pull-up control register PU0i="0") by software. In order to make these pins open, turn on their pull-up transistors (register PU0i="1") by software, or turn off their pull-up transistors (register PU0i="0") and set the output latch to "0" (i = 0, 1, 2, or 3). Be sure to select the key-on wakeup function and the pull-up function with every one port. (Note in order to set the output latch to "0" and make pins open) * After system is released from reset, a port is in a high-impedance state until the output latch of the port is set to "0" by software. Accordingly, the voltage level of pins is undefined and the excess of the supply current may occur. * To set the output latch periodically is recommended because the value of output latch may change by noise or a program run away (caused by noise). (Note in order to connect unused pins to VSS or VDD) * To avoid noise, connect the unused pins to VSS or VDD at the shortest distance using a thick wire.
PORT FUNCTION
Port Port D Pin D0-D4, D5/INT, D6/XCIN, D7/XCOUT Port P0 Port P1 P00-P03 P10-P13 I/O (4) I/O (4) N-channel open-drain N-channel open-drain 4 4 Input/ Output Output (8) Output structure N-channel open-drain Control bits 1 Control Control instructions registers SD MR RD CLD OP0A IAP0 OP1A IAP1 PU0 Pull-up functions Key-on wakeup functions Pull-up functions (programmable) Key-on wakeup functions (programmable) Port P2 P20/SEG16- P23/SEG19 Input (4) 4 IAP2 Remark
5
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
PORT BLOCK DIAGRAMS
Key-on wakeup input Register A Ai Ai OP0A instruction PU0i Key-on wakeup input Register A Ai Ai OP1A instruction DQ T LCD power supply LCD control signal (Note 1) Connected to when selecting SEG IAP1 instruction DQ T Pull-up transistor (Note 1) IAP0 instruction Pull-up transistor (Note 1)
P00-P03
P10-P13
P20/SEG16-P23/SEG19
L2i Register A
IAP2 instruction
LCD power supply
Register Y
Decoder (Note 1) CLD instruction S
SD instruction RD instruction
D0-D4
RQ (Note 1)
Register Y
Decoder CLD instruction
INT input
D5/INT
S SD instruction RD instruction Register Y Decoder CLD instruction S SD instruction RD instruction RQ
1
RQ (Note 1) MR2
0
D6/XCIN
MR2 MR2 XCIN clock (Note 1) MR2 S RQ
0 1
Register Y
Decoder CLD instruction
D7/XCOUT
SD instruction RD instruction
Notes 1: This symbol represents a parasitic diode. 2: i represents bit 0, 1, 2 or 3.
6
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
PORT BLOCK DIAGRAMS (continued)
To timer 1 TC1A instruction
CARRY
Register C1
(Note) Carrier wave output circuit
CR flag
STCR instruction SPCR instruction SQ R
W31
CARR
Timer LC underflow signal
F/F
W30
Timer 1 underflow signal
F/F
C20
W20
LCD power supply LCD control signal Pch SEG0-SEG15 Nch
LCD control signal LCD power supply
LCD power supply LCD control signal Pch COM0-COM3 Pch
LCD control signal LCD power supply
LCD power supply LCD control signal
Nch
LCD control signal
Nch
Note: This symbol represents a parasitic diode.
7
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
FUNCTION BLOCK OPERATIONS CPU

(1) Arithmetic logic unit (ALU) The arithmetic logic unit ALU performs 4-bit arithmetic such as 4-bit data addition, comparison, AND operation, OR operation, and bit manipulation. (2) Register A and carry flag (CY) Register A is a 4-bit register used for arithmetic, transfer, exchange, and I/O operation. Carry flag CY is a 1-bit flag that is set to "1" when there is a carry with the AMC instruction (Figure 1). It is unchanged with both A n instruction and AM instruction. The value of A0 is stored in carry flag CY with the RAR instruction (Figure 2). Carry flag CY can be set to "1" with the SC instruction and cleared to "0" with the RC instruction. (3) Registers B and E Register B is a 4-bit register used for temporary storage of 4bit data, and for 8-bit data transfer together with register A. Register E is an 8-bit register. It can be used for 8-bit data transfer with register B used as the high-order 4 bits and register A as the low-order 4 bits (Figure 3). (4) Register D Register D is a 3-bit register. It is used to store a 7-bit ROM address together with register A and is used as a pointer within the specified page when the TABP p, BLA p, or BMLA p instruction is executed (Figure 4).
(CY) (M(DP)) Addition (A)
Fig. 1 AMC instruction execution example
ALU
SC instruction
RC instruction
CY
A3 A2 A1 A0 RAR instruction
A0
CY A3 A2 A1
Fig. 2 RAR instruction execution example
Register B TAB instruction Register A B3 B2 B1 B0 A3 A2 A1 A0 TEAB instruction Register E E7 E6 E5 E4 E3 E2 E1 E0 TABE instruction B3 B2 B1 B0 Register B A3 A2 A1 A0 Register A
TBA instruction
Fig. 3 Registers A, B and register E
TABP p instruction Specifying address
ROM 8 4 0
PCH p6 p5 p4 p3 p2 p1 p0
PCL DR2 DR1 DR0 A3 A2 A1 A0
Low-order 4 bits Register A (4) Middle-order 4 bits Register B (4)
Immediate field value p
The contents of The contents of register D register A
Fig. 4 TABP p instruction execution example
8
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(5) Stack registers (SKS) and stack pointer (SP) Stack registers (SKs) are used to temporarily store the contents of program counter (PC) just before branching until returning to the original routine when; * branching to an interrupt service routine (referred to as an interrupt service routine), * performing a subroutine call, or * executing the table reference instruction (TABP p). Stack registers (SKs) are eight identical registers, so that subroutines can be nested up to 8 levels. However, one of stack registers is used when using an interrupt service routine or when executing a table reference instruction. Accordingly, be careful not to stack over when performing these operations together. The contents of registers SKs are destroyed when 8 levels are exceeded. The register SK nesting level is pointed automatically by 3bit stack pointer (SP). The contents of the stack pointer (SP) can be transferred to register A with the TASP instruction. Figure 5 shows the stack registers (SKs) structure. Figure 6 shows the example of operation at subroutine call. (6) Interrupt stack register (SDP) Interrupt stack register (SDP) is a 1-stage register. When an interrupt occurs, this register (SDP) is used to temporarily store the contents of data pointer, carry flag, skip flag, register A, and register B just before an interrupt until returning to the original routine. Unlike the stack registers (SKs), this register (SDP) is not used when executing the subroutine call instruction and the table reference instruction. (7) Skip flag Skip flag controls skip decision for the conditional skip instructions and continuous described skip instructions. When an interrupt occurs, the contents of skip flag is stored automatically in the interrupt stack register (SDP) and the skip condition is retained.
Program counter (PC) Executing the subroutine Executing the return or call or table reference table reference instruction instruction SK0 (SP) = 0 SK1 SK2 SK3 SK4 SK5 SK6 SK7 (SP) = 1 (SP) = 2 (SP) = 3 (SP) = 4 (SP) = 5 (SP) = 6 (SP) = 7
Stack pointer (SP) points "7" at reset or returning from RAM back-up mode. It points "0" by executing the first BM instruction, and the contents of program counter is stored in SK0. When the BM instruction is executed after eight stack registers are used ((SP) = 7), (SP) = 0 and the contents of SK0 is destroyed.
Fig. 5 Stack registers (SKs) structure
(SP) (SK0) (PC)
0 000116 SUB1
Main program Address 000016 NOP 000116 BM SUB1 000216 NOP
Subroutine
SUB1 : NOP * * * RT
(PC) (SP)
(SK0) 7
Note: Returning to the BM instruction execution address with the RT instruction, and the BM instruction is equivalent to the NOP instruction.
Fig. 6 Example of operation at subroutine call
9
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(8) Program counter (PC) Program counter (PC) is used to specify a ROM address (page and address). It determines a sequence in which instructions stored in ROM are read. It is a binary counter that increments the number of instruction bytes each time an instruction is executed. However, the value changes to a specified address when branch instructions, subroutine call instructions, return instructions, or the table reference instruction (TABP p) is executed. Program counter consists of PCH (most significant bit to bit 7) which specifies to a ROM page and PCL (bits 6 to 0) which specifies an address within a page. After it reaches the last address (address 127) of a page, it specifies address 0 of the next page (Figure 7). Make sure that the PCH does not specify after the last page of the built-in ROM. (9) Data pointer (DP) Data pointer (DP) is used to specify a RAM address and consists of registers Z, X, and Y. Register Z specifies a RAM file group, register X specifies a file, and register Y specifies a RAM digit (Figure 8). Register Y is also used to specify the port D bit position. When using port D, set the port D bit position to register Y certainly and execute the SD, RD, or SZD instruction (Figure 9).
Program counter (PC) p6 p5 p4 p3 p2 p1 p0 a6 a5 a4 a3 a2 a1 a0
PCH Specifying page
PCL Specifying address
Fig. 7 Program counter (PC) structure
Data pointer (DP) Z1 Z0 X3 X2 X1 X0 Y3 Y2 Y1 Y0
Register Y (4) Register X (4)
Specifying RAM digit
Specifying RAM file
Register Z (2)
Specifying RAM file group
Fig. 8 Data pointer (DP) structure
Specifying bit position Set
D7 D6 D5 D4 D0
0
1
0
1
1 Port D output latch
Register Y (4)
Fig. 9 SD instruction execution example
10
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
PROGRAM MEMORY (ROM)
1 word of ROM is composed of 10 bits. ROM is separated every 128 words by the unit of page (addresses 0 to 127). Table 1 shows the ROM size and pages. Figure 10 shows the ROM map of M34551E8. Table 1 ROM size and pages Product M34551M4 M34551E8 ROM size (! 10 bits) 4096 words 8192 words Pages 32 (0 to 31) 64 (0 to 63)
98 000016 007F16 008016 00FF16 010016 017F16 018016
76
5
432
10 Page 0
Interrupt address page Subroutine special page
Page 1 Page 2 Page 3
0FFF16
Page 31
A top part of page 1 (addresses 008016 to 00FF16) is reserved for interrupt addresses (Figure 11). When an interrupt occurs, the address (interrupt address) corresponding to each interrupt is set in the program counter, and the instruction at the interrupt address is executed. When using an interrupt service routine, write the instruction generating the branch to that routine at an interrupt address. Page 2 (addresses 010016 to 017F16) is the special page for subroutine calls. Subroutines written in this page can be called from any page with the 1-word instruction (BM). Subroutines extending from page 2 to another page can also be called with the BM instruction when it starts on page 2. ROM pattern (bits 7 to 0) of all addresses can be used as data areas with the TABP p instruction.
1FFF16
Fig. 10 ROM map of M34551E8
Page 63
008016
98 7 6 5 4 3 2 10 External 0 interrupt address
008416 008616
Timer 1 interrupt address Timer 2 interrupt address
00FF16
Fig. 11 Interrupt address page (addresses 008016 to 00FF16) structure
11
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
DATA MEMORY (RAM)
1 word of RAM is composed of 4 bits, but 1-bit manipulation (with the SB j, RB j, and SZB j instructions) is enabled for the entire memory area. A RAM address is specified by a data pointer. The data pointer consists of registers Z, X, and Y. Set a value to the data pointer certainly when executing an instruction to access RAM. RAM includes the area corresponding to the LCD. A segment is turned on automatically when "1" is written in the bit corresponding to the segment. Table 2 shows the RAM size. Figure 12 shows the RAM map.
Table 2 RAM size Product M34551M4 M34551E8
RAM size 280 words ! 4 bits (1120 bits)
RAM 280 words ! 4 bits (1120 bits) Register Z 0 Register X 0 1 2 3 *** 6 7 ****** 15 0 1 2 3 4 5
0
1 1
2
Register Y
6 7 8 9 10 11 12 13 14 15
0 1 2 3 4 5 6 7
8 9 10 11 12 13 14 15
16 17 18 19
280 words Notes 1: The area marked "-" (Z = 1, X = 0 to 2, Y = 0 to 7) is not a memory area. 2: The numbers in the shaded area indicate the corresponding segment output pin numbers.
Fig. 12 RAM map
12
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
INTERRUPT FUNCTION
The interrupt type is a vectored interrupt branching to an individual address (interrupt address) according to each interrupt source. An interrupt occurs when the following 3 conditions are satisfied. * Interrupt enable flag (INTE) = "1" (Interrupt enabled) * Interrupt enable bit = "1" (Interrupt request occurrence enabled) * An interrupt activated condition is satisfied (request flag = "1") Table 3 shows interrupt sources. (Refer to each interrupt request flag for details of activated conditions.) (1) Interrupt enable flag (INTE) The interrupt enable flag (INTE) controls whether the every interrupt enable/disable. Interrupts are enabled when INTE flag is set to "1" with the EI instruction and disabled when INTE flag is cleared to "0" with the DI instruction. When any interrupt occurs, the INTE flag is automatically cleared to "0," so that other interrupts are disabled until the EI instruction is executed. (2) Interrupt enable bits (V10-V13) Use an interrupt enable bit of interrupt control register V1 to select the corresponding interrupt request or skip instruction. Table 4 shows the interrupt request flag, interrupt enable bit and skip instruction. Table 5 shows the interrupt enable bit function. (3) Interrupt request flag When the activated condition for each interrupt is satisfied, the corresponding interrupt request flag is set to "1." Each interrupt request flag is cleared to "0" when either; * an interrupt occurs, or * the next instruction is skipped with a skip instruction. Each interrupt request flag is set when the activated condition is satisfied even if the interrupt is disabled by the INTE flag or its interrupt enable bit. Once set, the interrupt request flag retains set until a clear condition is satisfied. Accordingly, an interrupt occurs when the interrupt disable state is released while the interrupt request flag is set. If more than one interrupt request flag is set when the interrupt disable state is released, the interrupt priority level is as follows shown in Table 3.
Table 3 Interrupt sources Interrupt Priority Activated condition Interrupt name address level Address 0 1 External 0 interrupt Level change of in page 1 INT pin 2 Timer 1 underflow Address 4 Timer 1 interrupt in page 1 3 Timer 2 interrupt Timer 2 underflow Address 6 in page 1
Table 4 Interrupt request flag, interrupt enable bit and skip instruction Request flag Enable bit Skip instruction Interrupt name V10 EXF0 SNZ0 External 0 interrupt Timer 1 interrupt Timer 2 interrupt T1F T2F V12 V13 SNZT1 SNZT2
Table 5 Interrupt enable bit function Occurrence of Interrupt enable bit interrupt request 1 0 Enabled Disabled
Skip instruction Invalid Valid
13
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(4) Internal state during an interrupt The internal state of the microcomputer during an interrupt is as follows (Figure 14). * Program counter (PC) An interrupt address is set in program counter. The address to be executed when returning to the main routine is automatically stored in the stack register (SK). * Interrupt enable flag (INTE) INTE flag is cleared to "0" so that interrupts are disabled. * Interrupt request flag Only the request flag for the current interrupt source is cleared to "0." * Data pointer, carry flag, skip flag, registers A and B The contents of these registers and flags are stored automatically in the interrupt stack register (SDP). (5) Interrupt processing When an interrupt occurs, a program at an interrupt address is executed after a branch to a sequence for storing data into stack register is performed. Write the branch instruction to an interrupt service routine at an interrupt address. Use the RTI instruction to return to main routine. Interrupt enabled by executing the EI instruction is performed after executing 1 instruction (just after the next instruction is executed). Accordingly, when the EI instruction is executed just before the RTI instruction, interrupts are enabled after returning to the main routine. (Refer to Figure 13)
*Program counter (PC) ..................................................... Each interrupt address *Stack register (SK) ........... The address of main routine to be executed when returning *Interrupt enable flag (INTE) ........................................................ 0 (Interrupt disabled) *Interrupt request flag (only the flag for the current interrupt source) ........................................................................................ 0 *Data pointer, carry flag, registers A and B, skip flag ............... Stored in the interrupt stack register (SDP) automatically Fig. 14 Internal state when interrupt occurs
INT pin (L H or H L input)
EXF0
V10
Address 0 in page 1 Address 4 in page 1
Timer 1 underflow Timer 2 underflow Activated condition
T1F
V12
Main routine
Interrupt service routine Interrupt occurs
T2F Request flag (state retained)
V13 Enable bit
INTE Enable flag
Address 6 in page 1
Fig. 15 Interrupt system diagram
Interrupt is enabled
EI RTI
: Interrupt enabled state : Interrupt disabled state
Fig. 13 Program example of interrupt processing
14
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(6) Interrupt control register q Interrupt control register V1 Interrupt enable bits of external 0, timer 1 and timer 2 are assigned to register V1. Set the contents of this register Table 6 Interrupt control register Interrupt control register V1 V13 V12 V11 V10 Timer 2 interrupt enable bit Timer 1 interrupt enable bit Not used External 0 interrupt enable bit 0 1 0 1 0 1 0 1
through register A with the TV1A instruction. The TAV1 instruction can be used to transfer the contents of register V1 to register A.
at reset : 00002
at power down : 00002
R/W
Interrupt disabled (SNZT2 instruction is valid) Interrupt enabled (SNZT2 instruction is invalid) Interrupt disabled (SNZT1 instruction is valid) Interrupt enabled (SNZT1 instruction is invalid) This bit has no function, but read/write is enabled. Interrupt disabled (SNZ0 instruction is valid) Interrupt enabled (SNZ0 instruction is invalid)
Note: "R" represents read enabled, and "W" represents write enabled. (7) Interrupt sequence Interrupts occur only when the respective INTE flag, interrupt enable bits (V10-V13), and interrupt request flags (EXF0, T1F, T2F) are "1." The interrupt actually occurs 2 to 3 machine cycles after the cycle in which all three conditions are satisfied. The interrupt occurs after 3 machine cycles only when the three interrupt conditions are satisfied on execution of other than one-cycle instructions (Refer to Figure 16).
q When an interrupt request flag is set after its interrupt is enabled
1 machine cycle
System clock (STCK)
Interrupt enable flag (INTE)
"1" "0"
EI instruction execution cycle Interrupt enabled state
Interrupt disabled state
INT pin External interrupt EXF0 flag
"H" "L" "1" "0" Interrupt activated condition is satisfied.
Retaining level for 4 cycles or more of STCK is necessary.
Timer 1 and Timer 2 interrupts
"1" T1F, T2F "0" flags Flag cleared 2 to 3 machine cycles (Note 1, 2) Notes 1: The address is stacked to the last cycle. 2: This interval of cycles depends on the executed instruction at the time when each interrupt activated condition is satisfied. Software starts from the interrupt address.
Fig. 16 Interrupt sequence
15
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
EXTERNAL INTERRUPTS
An external interrupt request occurs when a valid waveform (= waveform causing the external 0 interrupt) is input to an interrupt input pin (edge detection). The external 0 interrupt can be controlled with the interrupt control register I1. Table 7 External interrupt activated condition Name External 0 interrupt Input pin D5/INT Valid waveform Falling waveform ("H""L") Rising waveform ("L""H") Valid waveform selection bit (I12) 0 1
I12
Falling
0 D5/INT 1
Rising One-sided edge detection circuit
EXF0 Skip
External 0 interrupt
SNZI0 instruction
Fig. 17 External interrupt circuit structure
16
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(1) External 0 interrupt request flag (EXF0) External 0 interrupt request flag (EXF0) is set to "1" when a valid waveform is input to D5/INT pin. The valid waveforms causing the interrupt must be retained at their level for 4 cycles or more of the system clock (Refer to Figure 16). The state of EXF0 flag can be examined with the skip instruction (SNZ0). Use the interrupt control register V1 to select the interrupt or the skip instruction. The EXF0 flag is cleared to "0" when an interrupt occurs or when the next instruction is skipped with the skip instruction. The D5/INT pin need not be selected the external interrupt input INT function or the normal output port D5 function. However, the EXF0 flag is set to "1" when a valid waveform output from port D5 is input to INT pin even if it is used as an output port D5. q External 0 interrupt activated condition External 0 interrupt activated condition is satisfied when a valid waveform is input to D5/INT pin. The valid waveform can be selected from rising waveform or falling waveform. An example of how to use the external 0 interrupt is as follows. Select the valid waveform with the bit 2 of register I1. Clear the EXF0 flag to "0" with the SNZ0 instruction. Set the NOP instruction for the case when a skip is performed with the SNZ0 instruction. Set both the external 0 interrupt enable bit (V10) and the INTE flag to "1." The external 0 interrupt is now enabled. Now when a valid waveform is input to the D5/INT pin, the EXF0 flag is set to "1" and the external 0 interrupt occurs. Table 8 External interrupt control register Interrupt control register I1 I13 Not used 0 1 0 I12 Interrupt valid waveform for INT pin selection bit (Note 2) 1 0 1 0
(2) External interrupt control register q Interrupt control register I1 Register I1 controls the valid waveform for the external 0 interrupt. Set the contents of this register through register A with the TI1A instruction. The TAI1 instruction can be used to transfer the contents of register I1 to register A.
at reset : 00002
at power down : state retained
R/W
This bit has no function, but read/write is enabled. Falling waveform ("L" level of INT pin is recognized with the SNZI0 instruction) Rising waveform ("H" level of INT pin is recognized with the SNZI0 instruction)
I11 I10
Not used Not used
This bit has no function, but read/write is enabled.
This bit has no function, but read/write is enabled. 1 Notes 1: "R" represents read enabled, and "W" represents write enabled. 2: Depending on the input state of D5/INT pin, the external interrupt request flag EXF0 may be set to "1" when the contents of I12 is changed. Accordingly, set a value to bit 2 of register I1 and execute the SNZ0 instruction to clear the EXF0 flag after executing at least one instruction.
17
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
TIMERS
The 4551 Group has the programmable timers. q Programmable timer The programmable timer has a reload register and enables the frequency dividing ratio to be set. It is decremented from a set value n. When it underflows (count to n + 1), a timer interrupt request flag is set to "1," new data is loaded from the reload register, and count continues (auto-reload function).
q Fixed dividing frequency timer The fixed dividing frequency timer has the fixed frequency dividing ratio (n). An interrupt request flag is set to "1" every n count of a count pulse.
FF16 n : Counter initial value Count starts n Reload Reload
The contents of counter
1st underflow
2nd underflow
0016 Time n+1 count Timer 1 interrupt "1" request flag "0" An interrupt occurs or a skip instruction is executed. n+1 count
Fig. 18 Auto-reload function The 4551 Group timer consists of the following circuits. * Prescaler : frequency divider * Timer 1 : 8-bit programmable timer * Timer 2 : 14-bit fixed dividing frequency timer * Timer LC : 4-bit programmable timer (Timers 1 and 2 have the interrupt function, respectively) Table 9 Function related timers Circuit Prescaler Timer 1 Structure Frequency divider 8-bit programmable binary down counter Timer 2 Count source * Instruction clock (INSTCK) * Prescaler output (ORCLK) * Carrier generating circuit output (CARRY, CARRY/2) 16384 * f(XCIN) 1 to 16 Frequency dividing ratio 4, 8 1 to 256 Use of output signal * Timer 1 and 2 count sources * Timer 1 interrupt * Port CARR output control * Timer 2 interrupt * Divider for LCD * Watchdog timer * Divider for LCD * Carrier output W3 Control register W1 W1 W2 W2 Prescaler, timer 1, timer 2 and timer LC can be controlled with the timer control registers W1, W2 and W3. Each function is described below.
14-bit fixed dividing * Prescaler output (ORCLK) frequency
Timer LC
4-bit programmable * Bit 3 of timer 2 binary down counter * System clock (STCK)
18
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
INSTCK Frequency dividing circuit (divided by 4) MR3
1 0
Prescaler W13
0
W12 1/4 1/8
0
MR0
XIN XCIN
0 1
Frequency dividing circuit (divided by 3) STCK
ORCLK
1 1
W11,W10
ORCLK CARRY
00,01 10
W20 (Note 1)
0 1
Timer 1 (8)
T1F
Timer 1 interrupt
1
11
2
(TAB1)
Reload register R1 (8) (T1AB) (Note 2) Register B Register A
Carrier wave output control
W31 STCK
1 0
W30 (Note 1) Count 0 source
1
To port CARR Timer LC (4) Reload register LC (4)
1
2
LCD clock
WRST instruction
S
WEF
W23 (Note 3)
0
Q
Reset signal
R
ORCLK
1
0 1 2 3 4 5 6 7 8 9 10 11 12 13
Count source
Timer 2
WDF
D T
Q
System reset
W22, W21
00 01 Not available 10,11
T2F
Timer 2 interrupt
Notes 1: Count source is stopped by setting to "0." 2: When the T1AB instruction is executed after setting W20 to "1," data is written only to reload register R1. 3: When the contents of W23 changes from "0" to "1," the count value of timer 2 is initialized.
Fig. 19 Timers structure
19
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Table 10 Timer control registers Timer control register W1 W13 W12 Prescaler control bit Prescaler dividing ratio selection bit 0 1 0 1
W11 W10
at reset : 00002
at power down : 00002
R/W
Stop (prescaler state initialized) Operating Instruction clock (INSTCK) divided by 4 Instruction clock (INSTCK) divided by 8 Count source Prescaler output (ORCLK) Carrier output (CARRY) Carrier output divided by 2 (CARRY/2)
W11 Timer 1 count source selection bits W10
0 0 1 1
0 1 0 1
Timer control register W2 W23 Timer 2 count source selection bit 0 1
at reset : 10002
at power down : - - - 02
R/W
f(XCIN) Prescaler output (ORCLK) Count source Underflow occur every 2 count Underflow occur every 213 count Not available Not available Stop (timer 1 state retained) Operating
14
W22 W21
W22 Timer 2 count value selection bits W21
0 0 1 1 0 1
0 1 0 1
W20
Timer 1 control bit
Timer control register W3 W31 W30 Timer LC count source selection bit Timer LC control bit 0 1 0
at reset : 002
at power down : state retained
R/W
Bit 3 of timer 2 is output (timer 2 count source divided by 16) State clock (STCK) Stop (timer LC state retained)
1 Operating Note: "R" represents read enabled, and "W" represents write enabled. "-" represents state retained. (1) Timer control registers q Timer control register W1 Register W1 controls the count source of timer 1, the frequency dividing ratio and count operation of prescaler. Set the contents of this register through register A with the TW1A instruction. The TAW1 instruction can be used to transfer the contents of register W1 to register A. q Timer control register W2 Register W2 controls the count operation of timer 1 and count operation and count source of timer 2. Set the contents of this register through register A with the TW2A instruction. The TAW2 instruction can be used to transfer the contents of register W2 to register A. q Timer control register W3 Register W3 controls the count operation and count source of timer LC. Set the contents of this register through register A with the TW3A instruction. The TAW3 instruction can be used to transfer the contents of register W3 to register A.
20
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(2) Precautions Note the following for the use of timers. q Prescaler Stop the prescaler operation to change its frequency dividing ratio. q Count source Stop timer 1 or timer LC counting to change its count source. When timer 2 count source changes from f(XCIN) to ORCLK (W23 = "0" W23 = "1"), the count value of timer 2 is initialized. However, when timer 2 count source changes from ORCLK to f(XCIN) (W23 = "1" W23 = "0") or the same count source is set again (W23 = "0" W23 = "0" or W23 = "1" W23 = "1"), the count value of timer 2 is not initialized. q Timer 2 Timer 2 has the watchdog timer function (WDT). When timer 2 is used as the WDT, note that the processing to initialize the count value and the execution of the WRST instruction. q Reading the count value Stop the prescaler and then execute the TAB1 instruction to read timer 1 data. q Writing to reload register R1 When writing data to reload register R1 while timer 1 is operating, avoid a timing when timer 1 underflows. (3) Prescaler Prescaler is a frequency divider. Its frequency dividing ratio can be selected. The count source of prescaler is the instruction clock (INSTCK). Use the bit 2 of register W1 to select the prescaler dividing ratio and the bit 3 to start and stop its operation. When the bit 3 of register W1 is cleared to "0," prescaler is initialized, and the output signal (ORCLK) stops. (4) Timer 1 (interrupt function) Timer 1 is an 8-bit binary down counter with the timer 1 reload register (R1). When timer 1 stops, data can be set simultaneously in timer 1 and the reload register (R1) with the T1AB instruction. When timer 1 is operating, data can be set only in the reload register (R1) with the T1AB instruction. When setting the next count data to reload register R1 while timer 1 is operating, be sure to set data before timer 1 underflows. Timer 1 starts counting after the following process; set data in timer 1, select the count source with bits 0 and 1 of register W1, set the bit 0 of register W2 to "1." Once count is started, when timer 1 underflows (the next count pulse is input after the contents of timer 1 becomes "0"), the timer 1 interrupt request flag (T1F) is set to "1," new data is loaded from reload register R1, and count continues (autoreload function). When a value set in reload register R1 is n, timer 1 divides the count source signal by n + 1 (n = 0 to 255). Data can be read from timer 1 to registers A and B. Stop counting and then execute the TAB1 instruction to read its data.
(5) Timer 2 (interrupt function) Timer 2 is a 14-bit binary down counter. Timer 2 starts counting after the following process; select the count source with the bit 3 of register W2, and the clock as a count source is supplied. Timer 2 stops counting and its count value is retained when supply of a clock as a count source stops. Timer 2 is initialized at reset and when the count source changes from f(XCIN) (W23="0") to ORCLK (W23="1"). The count value to set the timer 2 interrupt request flag (T2F) to "1" can be selected from every 8192 count or every 16384 count with bits 1 and 2 of register W2. The count source signal divided by 16 is output from timer 2. Timer 2 can be used as a counter for clock in the clock operating mode (POF instruction executed). (6) Timer LC Timer LC is a 4-bit binary down counter with the timer LC reload register (RLC). Data can be set simultaneously in timer LC and the reload register (RLC) with the TLCA instruction. Timer LC starts counting after the following process; set data in timer LC, select the count source with the bit 1 of register W3, set the bit 0 of register W3 to "1." Timer LC is the timer for LCD clock generating. Also, it can be used as the multi-carrier generator by setting the bit 1 of register W3 to "1" and selecting the system clock (STCK) as a count source. When the multi-carrier generator is selected, the waveform which is the timer LC underflow signal divided by 2 can be output as a carrier wave from port CARR. At this time, stop the carrier generating circuit and LCD control circuit. When the multi-carrier generator (duty ratio: 1/2 fixed) is used, the enable/stop of the carrier wave output from port CARR can be set by the stop of timer LC or the carrier wave output auto-control function by timer 1. (7) Timer interrupt request flags (T1F and T2F) Each timer interrupt request flag is set to "1" when each timer underflows. The state of these flags can be examined with the skip instructions (SNZT1 and SNZT2). Use the interrupt control register V1 to select an interrupt or a skip instruction. An interrupt request flag is cleared to "0" when an interrupt occurs or when the next instruction is skipped with a skip instruction.
21
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
WATCHDOG TIMER
Watchdog timer provides a method to reset the system when a program runs wild. Watchdog timer consists of timer 2, watchdog timer enable flag (WEF), and watchdog timer flag (WDF). When the WRST instruction is executed after system is released from reset, the WEF flag is set to "1." At this time, the watchdog timer starts operating. When the WEF flag is set to "1," it cannot be cleared to "0" until system reset is performed. Also, when the WRST instruction is not executed once, watchdog timer does not operate because the WEF flag retains "0." When the watchdog timer is operating, the WDF flag is set to "1" every time the bit 12 of timer 2 is cleared from "1" to "0." This means that count is performed 8192 times. When the bit 12 of
timer 2 is cleared from "1" to "0" while the WDF flag is set to "1," the internal reset signal is generated and system reset is performed. The WDF flag can be cleared to "0" with the WRST instruction. In the RAM back-up mode, through timer 2 count operation stops, its count value is retained and the WDF flag is initialized. In the clock operating mode, timer 2 count operation is continued and the WDF flag is initialized. When using the watchdog timer, execute the WRST instruction at a certain cycle which consists of timer 2's 8191 counts or less to keep the microcomputer operation normal.
3FFF16
Value of timer 2 1FFF16
0000 16
WEF flag "1" "0" "1" "0" "H" "L" System reset
WRST instruction WRST instruction execution execution
WDF flag
Internal reset signal
Fig. 20 Watchdog timer function The contents of the WDF flag are initialized in the RAM back-up mode. If the WDF flag is set to "1" at the same time that the microcomputer enters the RAM back-up mode, system reset may be performed. When using the watchdog timer and the RAM back-up mode, initialize the WDF flag with the WRST instruction just before the microcomputer enters the RAM back-up mode (refer to Figure 21).
* * * * * * WRST EPOF POF2
; Clear WDF flag ; POF instruction execution enabled
Oscillation stop (RAM back-up mode)
Fig. 21 Program example to enter the RAM back-up mode when using the watchdog timer
22
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
CARRIER GENERATING CIRCUIT
The 4551 Group has a carrier generating circuit that generates the transfer waveform by dividing the system clock (STCK) for each remote control carrier wave. Each carrier waveform can be output by setting the carrier wave selection register (C1). Also, timer 1 can auto-control the carrier wave output from port CARR by setting the carrier wave output control register (C2).
Carrier wave selection register C1
Register C1 Setting value
C13 C12 C11 C10
STCR instruction
(at reset: 0 1 1 1 2, at power down: 0 1 1 1 2, W) Output waveform
SPCR instruction
Carrier wave Frequency Duty
0
0
0
0
"H" "L"
1/3
STCK/24
0
0
0
1
"H" "L"
1/2 1/4
STCK/16
0
0
1
0
"H" "L"
0
0
1
1
"H" "L"
1/2
STCK/2
0 0 1 0 1 0 1 1
1 1 1 1 1 1 1 0
0 0 0 1 1 1 1 0
0 1 1 0 0 1 1 0
"H" "L"
1/2
"H" "L"
No carrier wave
No available
"H" "L"
"L" fixed
"H" "L"
1/3
STCK/12
1
0
0
1
"H" "L"
1/2 1/4
STCK/8
1
0
1
0
"H" "L"
1
0
1
1
"H" "L"
1/2
STCK
1
1
0
0
"H" "L"
1/2
Note:"W" represents write enabled.
Fig. 22 Carrier wave selection register
23
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Table 11 Carrier generating circuit control register and control flag Carrier wave output control register C2 C20 Carrier wave output auto-control bit 0 1 at reset : 02 at power down : 02 W
Auto-control output by timer 1 is invalid Auto-control output by timer 1 is valid
Carrier wave generating control flag CR CR Carrier wave generating control 0 1
at reset : 02
at power down : 02
W
Carrier wave generating stop (SPCR instruction) Carrier wave generating start (STCR instruction)
Note: "W" represents write enabled. (1) Carrier generating circuit related registers q Carrier wave selection register C1 Each carrier waveform can be selected by setting the register C1. Set the contents of this register through register A with the TC1A instruction. q Carrier wave output control register C2 Timer 1 can auto-control the output enable interval and the output disable interval of the carrier wave output from port CARR by setting the register C2. Set the contents of this register through register A with the TC2A instruction. The setting of the output enable/disable interval is described below. Validate the carrier wave output auto-control function (C20="1"). Select the carrier wave or the carrier wave divided by 2 as the timer 1 count source. Set the count value (the output enable interval of carrier wave from port CARR) to timer 1. Operate timer 1 (W20="1"). Operate the carrier generating circuit (STCR instruction executed). Set the next count value (the output disable interval of carrier wave from port CARR) to reload register R1 before timer 1 underflow occurs. The carrier wave is output from port CARR until the first timer 1 underflow occurs. The output of the carrier wave from port CARR is disabled and the next count value is loaded from reload register R1 to timer 1 by the first timer 1 underflow. Then, the output of carrier wave is disabled until the second timer 1 underflow. Also, the next enable interval of the carrier wave output can be set by setting the third count value to timer 1 reload register before the second timer 1 underflow occurs. If the carrier wave output auto-control function is invalidated (C20="0") while the carrier wave output is autocontrolled, the output of port CARR retains the state when the auto-control is invalidated regardless of timer 1 underflow. This state can be terminated by timer 1 stop (W20="0"). When the carrier wave output auto-control function is validated (C20="1") again after it is invalidated (C20="0"), the autocontrol of carrier wave output is started again when the next timer 1 underflow occurs. (2) Carrier wave generating control flag (CR) The CR flag is used to control the carrier wave generating operation of the carrier generating circuit. The CR flag is "1" and the carrier wave generating is started by executing the STCR instruction. The CR flag is "0" and the carrier wave generating is stopped by executing the SPCR instruction. The CR flag is "0" at system reset. (3) Note on the carrier generating circuit stop In order to stop the carrier wave which has the cycle longer than that of the instruction clock with the SPCR instruction, stop it at the point when the carrier wave outputs "L" level in the SPCR instruction execution cycle. If this condition is not satisfied, the last "H" output interval of carrier wave is shortened. (4) Notes when using the carrier wave output auto-control function q Execute the STCR instruction after setting the timer 1 and register C2 in order to start the carrier generating circuit operation. q Stop the timer 1 (W20="0") after stopping the carrier generating circuit (SPCR instruction executed) while the carrier wave output is disabled in order to stop the carrier wave output auto-control operation. q If the carrier wave output auto-control function is invalidated (C20="0") while the carrier wave output is auto-controlled, the output of port CARR retains the state when the autocontrol is invalidated regardless of timer 1 underflow. This state can be terminated by timer 1 stop (W20="0"). When the carrier wave output auto-control function is validated (C20="1") again after it is invalidated (C20="0"), the auto-control of carrier wave output is started again when the next timer 1 underflow occurs. However, when the carrier wave output auto-control bit is changed during timer 1 underflow, the error-operation may occur. q Use the carrier wave or the carrier wave divided by 2 as the timer 1 count source when the carrier wave output autocontrol function is selected. If the ORCLK is used as the count source, a hazard may occur in port CARR output because ORCLK is not synchronized with the carrier wave.
24
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Timer 1 start
Timer 1 underflow Port CARR output (C20)1
"1" "0"
"H" "L"
v v Set the interval Set the interval "b" to "a" to timer 1. reload register R1.
Carrier wave output start
Timer 1 underflow
"1" "0"
Port CARR output
"H" "L"
Register C20
"1" "0"
Carrier wave output start
Fig. 23 Carrier wave output auto-control by timer 1
v
a
b
v Set the interval "c" to reload register R1.
c
v Set the interval "d" to reload register R1.
d
v
v
v
v
(C20)0
(C20)1 (C20)0
(C20)1
25
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
LCD FUNCTION
The 4551 Group has an LCD (Liquid Crystal Display) controller/ driver. When proper voltage is applied to the LCD power supply input pins and data are set in timer control registers (W2, W3), timer LC, LCD control registers (L1, L2), and LCD RAM, the LCD controller/driver automatically reads the display data and controls the LCD display by setting duty and bias. 4 common signal output pins and 20 segment signal output pins can be used to drive the LCD. By using these pins, up to 80 segments (when 1/4 duty and 1/3 bias are selected) can be controlled to display. When the required number of segment pins is 19 or less, pins SEG16-SEG19 (4) can be used as input ports P20-P23. (1) Duty and bias There are 3 combinations of duty and bias for displaying data on the LCD. Use bits 0 and 1 of LCD control register (L1) to select the proper display method for the LCD panel being used. q 1/2 duty, 1/2 bias q 1/3 duty, 1/3 bias q 1/4 duty, 1/3 bias Table 12 Duty and maximum number of displayed pixels Duty 1/2 1/3 Maximum number of displayed pixels 40 segments 60 segments Used COM pins COM0, COM1 (Note) COM0-COM2 (Note) COM0-COM3
(2) LCD clock control The LCD clock is determined by the timer 2 count source selection bit (W23), timer LC control bit (W30), and timer LC. Accordingly, the frequency (F) of the LCD clock is obtained by the following formula. Numbers ( to ) shown below the formula correspond to numbers in Figure 24, respectively. q When using the prescaler output (ORCLK) as timer 2 count source (W23="1") F = ORCLK ! 1 16
!
1 ! LC + 1
1 2

q When using the f(XCIN) as timer 2 count source (W23="0") F = f(XCIN) ! 1 16
!
1 LC + 1
!
1 2

[LC: 0 to 15]
The frame frequency and frame period for each display method can be obtained by the following formula: Frame frequency = n F F n (s) F: LCD clock frequency 1/n: Duty (Hz)
Frame period =
80 segments 1/4 Note: Leave unused COM pins open.

(Note)
W23 XCIN ORCLK
0 1
W31
1 0
W30
0 1
STCK 1/16
Timer LC
1/2
LCD clock
Note: Count source is stopped by clearing to "0."
Fig. 24 LCD clock control circuit structure
26
COM0 COM2 COM1 COM3 SEG0 SEG15 P20/SEG16 .................
(Note) VLC3
- - P23/SEG19
Multiplexer
................. Control signal
Fig. 25 LCD controller/driver structure
Multiplexer
Common driver
Bias control
Segment ... driver Segment driver Segment driver
Selector Selector Selector
...
...
Decoder RAM RAM
RAM
1/2, 1/3, 1/4 Counter
LCD clock (from timer block)
LCD on/off control
L13 L12 L11 L10
L23 L22 L21 L20
Register A
Note: VLC3=VDD.
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MITSUBISHI MICROCOMPUTERS
4551 Group
27
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(3) LCD RAM RAM contains areas corresponding to the liquid crystal display. When "1" is written to this LCD RAM, the display pixel corresponding to the bit is automatically displayed.
(4) LCD drive waveform When "1" is written to a bit in the LCD RAM data, the voltage difference between common pin and segment pin which correspond to the bit automatically becomes lVLC3l and the display pixel at the cross section turns on. When returning from reset, and in the RAM back-up mode, a display pixel turns off because every segment output pin and common output pin becomes VLC3 level (=VDD).
Z X Y 8 9 10 11 12 13 14 15 COM
Bit
0 3 SEG0 SEG1 SEG2 SEG3 SEG4 SEG5 SEG6 SEG7 COM3 2 SEG0 SEG1 SEG2 SEG3 SEG4 SEG5 SEG6 SEG7 COM2 1 SEG0 SEG1 SEG2 SEG3 SEG4 SEG5 SEG6 SEG7 COM1 0 SEG0 SEG1 SEG2 SEG3 SEG4 SEG5 SEG6 SEG7 COM0 3 SEG8 SEG9 SEG10 SEG11 SEG12 SEG13 SEG14 SEG15 COM3
1 1 2 SEG8 SEG9 SEG10 SEG11 SEG12 SEG13 SEG14 SEG15 COM2 1 SEG8 SEG9 SEG10 SEG11 SEG12 SEG13 SEG14 SEG15 COM1 0 SEG8 SEG9 SEG10 SEG11 SEG12 SEG13 SEG14 SEG15 COM0 3 SEG16 SEG17 SEG18 SEG19
2 2 1 SEG16 SEG16 SEG17 SEG17 SEG18 SEG18 SEG19 SEG19
0 SEG16 SEG17 SEG18 SEG19
COM3 COM2 COM1 COM0
Note: The area marked "
" is not the LCD display RAM.
Fig. 26 LCD RAM map Table 13 LCD control registers LCD control register L1 L13 L12 Not used LCD on/off bit
L11
at reset : 00002 0 1 0 1
L10
at power down : state retained
R/W
This bit has no function, but read/write is enabled Off On Duty Not available 1/2 1/3 1/4 1/2 1/3 1/3 Bias 0 1 0 1
L11 LCD duty and bias selection bits L10
0 0 1 1
LCD control register L2 L23 L22 L21 L20 P23/SEG19 pin function switch bit P22/SEG18 pin function switch bit P21/SEG17 pin function switch bit P20/SEG16 pin function switch bit 0 1 0 1 0 1 0 1
at reset : 11112 SEG19 P23 SEG18 P22 SEG17 P21 SEG16 P20
at power down : state retained
W
Note: "R" represents read enabled, and "W" represents write enabled.
28
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
1/2 Duty, 1/2 Bias: When writing (XX10)2 to address M (1, 2, 8) in RAM. 1 frame (2/F) M (1, 2, 8) COM0 COM1 1/F COM1 COM0 SEG16
COM1 SEG16 COM0 SEG16
0 (bit 0) 1 X X (bit 3)
Voltage level
VLC3 VLC1=VLC2 VSS
SEG16
VLC3 VLC1=VLC2 VSS
ON 1/3 Duty, 1/3 Bias: When writing (X101)2 to address M (1, 2, 8) in RAM.
OFF
1 frame (3/F) M (1, 2, 8) COM0 COM1 COM2 1/F COM2
Voltage level
1 (bit 0) 0 1 X (bit 3)
COM1
VLC3 VLC2 VLC1 VSS
SEG16 COM0 VLC3 VLC2 VLC1 VSS
SEG16
COM2 SEG16 COM1 SEG16 COM0 SEG16
ON
OFF
ON
1/4 Duty, 1/3 Bias: When writing (1010)2 to address M (1, 2, 8) in RAM. 1 frame (4/F) M (1, 2, 8) COM0 COM1 COM2 COM3 SEG16 COM1 1/F COM3
Voltage level
0 (bit 0) 1 0 1 (bit 3)
COM2
VLC3 VLC2 VLC1 VSS
COM0 VLC3 VLC2 VLC1 VSS
F: LCD clock frequency X: Set an arbitrary value. (These bits are not related to set the drive waveform at each duty.)
SEG16
COM3 SEG16 COM2 SEG16 COM1 SEG16 COM0 SEG16
ON
OFF
ON
OFF
Fig. 27 LCD controller/driver structure
29
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
RESET FUNCTION
____________
System reset is performed by applying "L" level to RESET pin for 1 machine cycle or more when the following condition is satisfied;
* the value of supply voltage is the minimum value or more of the recommended operating conditions. ____________ Then when "H" level is applied to RESET pin, software starts from address 0 in page 0.
f(XIN)
RESET
"H" "L"
(Note) f(XIN) is counted 10757 to 10786 times
Software start (Address 0 in page 0)
Note: The number of clock cycles depends on the internal state of the microcomputer when reset is performed.
Fig. 28 Reset release timing
Reset input 1machine cycle or more
f(XIN) is counted 10757 to 10786 times
=
0.85VDD RESET 0.3VDD (Note)
Software start (Address 0 in page 0)
Note: Keep the value of supply voltage the minimum value or more of the recommended operating conditions.
Fig. 29 RESET pin input waveform and reset operation (1) Power-on reset Reset can be automatically performed at power on (poweron reset) by the built-in power-on reset circuit. When the builtin power-on reset circuit is used, the time for the supply voltage to reach the minimum operating voltage must be set to 100
s or less. If the rising time exceeds 100 s, connect a capacitor between the RESET pin and VSS at the shortest distance, and input "L" level to RESET pin until the value of supply voltage reaches the minimum operating voltage.
VDD
Pull-up transistor
RESET pin
Power-on reset circuit
Internal reset signal
Power-on reset circuit output voltage
Voltage drop detection circuit (Note)
Reset state
Watchdog timer output WEF Internal reset signal
Note:
This symbol represents a parasitic diode. Applied potential to RESET pin must Power-on be VDD or less.
Reset released
Fig. 30 Power-on reset circuit example
30
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(2) Internal state at reset Table 14 shows port state at reset, and Figure 31 shows internal state at reset (they are retained after system is released from reset). Table 14 Port state at reset Name D0-D4, D5/INT D6/XCIN, D7/XCOUT P00-P03 P10-P13 P20/SEG16-P23/SEG19 SEG0-SEG15 COM0-COM3 CARR Function D0-D4, D5 D6, D7 P00-P03 P10-P13 P20-P23 SEG0-SEG15 COM0-COM3 CARR
The contents of timers, registers, flags and RAM except those shown in Figure 31 are undefined, so set the initial values to them.
State High impedance (Note 1) "H" (VDD) level (Note 1) (Notes 1, 2) High impedance VLC3 (VDD) level "L" (VSS) level
Notes 1: Output latch is set to "1." 2: The pull-up transistor is turned off.
* Program counter (PC) ............................................................................................ 000000 Address 0 in page 0 is set to program counter. 0 * Interrupt enable flag (INTE) ................................................................................... * Power down flag (P) .............................................................................................. 0 * External 0 interrupt request flag (EXF0) ............................................................... 0 0000 * Interrupt control register V1 ................................................................................... * Interrupt control register I1 .................................................................................... 0000 0 * Timer 1 interrupt request flag (T1F) ...................................................................... 0 * Timer 2 interrupt request flag (T2F) ...................................................................... * Watchdog timer flag (WDF) ................................................................................... 0 0 * Watchdog timer enable flag (WEF) ....................................................................... 0000 * Timer control register W1 ...................................................................................... * Timer control register W2 ...................................................................................... 0000 00 * Timer control register W3 ...................................................................................... 1000 * Clock control register MR ...................................................................................... * Carrier wave selection register C1 ........................................................................ 0111 0 * Carrier wave output control register C2 ................................................................ 0 * Carrier wave generating control flag CR ............................................................... * LCD control register L1 .......................................................................................... 0000 1111 * LCD control register L2 .......................................................................................... 0000 * Pull-up control register PU0 .................................................................................. * General-purpose register V2 ................................................................................. 0000 0 * Carry flag (CY) ....................................................................................................... 0000 * Register A .............................................................................................................. * Register B .............................................................................................................. 0000 !!! * Register D .............................................................................................................. * Register E .............................................................................................................. !!!!!!!! * Data pointer X ........................................................................................................ 0000 0000 * Data pointer Y ........................................................................................................ !! * Data pointer Z ........................................................................................................ * Stack pointer (SP) .................................................................................................. 111
0
0
0
0
0
0
0
0
(Interrupt disabled)
(Interrupt disabled)
(Prescaler stopped) (Timer 1 stopped) (Timer LC stopped)
(Carrier wave output disabled) (LCD off) (Port P2 selected)
"!" represents undefined.
Fig. 31 Internal state at reset
31
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
VOLTAGE DROP DETECTION CIRCUIT
The built-in voltage drop detection circuit is designed to detect a drop in voltage and to reset the microcomputer if the supply voltage drops below a set value.
Pull-up transistor
RESET pin
Power-on reset circuit
Internal reset signal
Voltage drop detection circuit
Watchdog timer output
WEF
Fig. 32 Voltage drop detection reset circuit
Voltage drop detection circuit Operating
Voltage drop detection circuit Stop
Voltage drop Voltage drop detection circuit detection circuit Operating Stop
Voltage drop detection circuit Operating
VDD
Detection voltage
Internal reset signal
"H" "L"
The microcomputer starts operation after the f(XIN) is counted 10757 to 10786 times.
Fig. 33 Voltage drop detection circuit operation waveform
32
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
POWER DOWN FUNCTION
The 4551 Group has 2-type power down functions. q Clock operating mode .................................. POF instruction q RAM back-up mode .................................... POF2 instruction Power down is performed by executing each instruction. Above power down functions are different from reset in start conditions. Table 15 shows the function and states retained at power down. Figure 36 shows the state transition. q Return from power down state ............. Warm start condition q Return from reset state .......................... Cold start condition (1) Clock operating mode The following functions and states are retained. q RAM q Reset circuit q XCIN-XCOUT oscillation q LCD display q Timer 2 (2) RAM back-up mode The following functions and states are retained. q RAM q Reset circuit Unlike the clock operating mode, all oscillations stop in the RAM back-up mode. (3) Warm start condition The system returns from the power down state when; q the external wakeup signal is input or the timer 2 underflow occurs in the clock operating mode, or when; q the external wakeup signal is input in the RAM back-up mode. In either case, the CPU starts executing the software from address 0 in page 0. In this case, the P flag is "1." (4) Cold start condition The CPU starts executing the software from address 0 in page 0 when; q reset pulse is input to RESET pin, or q reset by watchdog timer is performed. In this case, the P flag is "0."
Table 15 Functions and states retained at power down Function Program counter (PC), registers A, B, carry flag (CY), stack pointer (SP) (Note 2) Contents of RAM Port level Clock control register MR Timer control register W1 Timer control registers W2, W3 Interrupt control register V1 Interrupt control register I1 Carrier wave control registers and flag (C1, C2, CR) LCD display function LCD control registers L1, L2 Timer LC Timer 1 function Timer 2 function External 0 interrupt request flag (EXF0) Timer 1 interrupt request flag (T1F) Timer 2 interrupt request flag (T2F) Watchdog timer flag (WDF) Watchdog timer enable flag (WEF) Interrupt enable flag (INTE) Power down Clock RAM operating back-up ! O O O ! O ! O ! O O O ! O ! ! O O O ! ! ! O O O ! O ! O ! (Note 3) O (Note 4) ! O ! ! O ! O ! !
General-purpose register V2 Notes 1: "O" represents that the function can be retained, and "!" represents that the function is initialized. Registers and flags other than the above are undefined at power down, and set an initial value after returning. 2: The stack pointer (SP) points the level of the stack register and is initialized to "1112" at power down. 3: LCD is turned off. 4: The state of the timer is undefined.
33
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(5) Identification of the start condition Warm start or cold start can be identified by examining the state of the power down flag (P) with the SNZP instruction. The warm start condition (timer 2 or external wakeup signal) can be identified by examining the state of T2F flag.
Software start P = "1" ?
R
POF instruction or POF2 instruction Reset input
Powerdown flag P S Q
Yes
No Cold start
Yes
T2F = "1" ? No
q Set source q Clear source
POF or POF2 instruction executed Reset input
Return by timer 2 underflow
Return by external wakeup signal
Fig. 34 Set source and clear source of the P flag (6) Return signal An external wakeup signal or timer 2 interrupt request flag is used to return from the clock operating mode. An external wakeup signal is used to return from the RAM back-up mode because the oscillation is stopped. Table 16 shows the return condition for each return source.
Fig. 35 Start condition identified example using the SNZP instruction (7) Port P1 control register q Pull-up control register PU0 Register PU0 controls the ON/OFF of the port P1 pull-up transistor and the ON/OFF of the key-on wakeup function. Set the contents of this register through register A with the TPU0A instruction. In addition, the TAPU0 instruction can be used to transfer the contents of register PU0 to register A. Remarks
Table 16 Return source and return condition Return source External wakeup signal Return condition Ports P0, P1 Returns by an external falling Port P0 shares the falling edge detection circuit with port P1. The key-on edge input ("H""L"). wakeup function of port P0 is always valid. The only key-on wakeup function of the port P1 bit of which the pull-up transistor is turned on is valid. Set all the port using the key-on wakeup function to "H" level before going into the power down state.
Timer 2 interrupt Returns by timer 2 underflow and The timer 2 interrupt request flag (T2F) can be used only when system setting T2F to "1." returns from the clock operating mode (POF instruction execution). request flag However, if the POF and POF2 instructions are executed while the T2F = "1", its operation is recognized as the return condition and system returns from the clock operating mode. Note: P1 pin has the pull-up transistor which can be turned on/off by software. Table 17 Pull-up control register Pull-up control register PU0 PU03 PU02 PU01 Port P13 pull-up transistor control bit Port P12 pull-up transistor control bit Port P11 pull-up transistor control bit Port P10 pull-up transistor 0 1 0 1 0 1 at reset : 00002 at power down : state retained R/W
Pull-up transistor OFF, no key-on wakeup Pull-up transistor ON, key-on wakeup Pull-up transistor OFF, no key-on wakeup Pull-up transistor ON, key-on wakeup Pull-up transistor OFF, no key-on wakeup
Pull-up transistor ON, key-on wakeup Pull-up transistor OFF, no key-on wakeup 0 PU00 Pull-up transistor ON, key-on wakeup control bit 1 Note: "R" represents read enabled, and "W" represents write enabled.
34
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(8) State transition State transition is described using Figure 36.
Reset
POF execution
A ,E
Return input 1
I
Clock operating mode
f(XCIN):Stop
A
f(XIN):Oscillation f(XCIN):Stop System clock; f(XIN)/4 MR=(10002)
(Stabilizing time d )
E
MR3 1 MR3 0
(Note 2)
POF2 execution
f(XIN):Oscillation f(XCIN):Stop System clock; f(XIN) MR=(00002)
(Stabilizing time d )
K
A ,E
Return input 1
A ,E
(Stabilizing time a ) f(XIN):Stop
0 M 0 MRR2 R2 3 2 0 MMR 1 (Note 2) M 1 MRR3 3 2 1 1 )( MRR3 0 e d Stab il tim M
ab (St iliz ing
A ,E
(Stabilizing time a )
MR2 1
MR2 0
MR2 1
MR2 0
izin
POF execution
B,F
Return input 1, 2
J
Clock operating mode
f(XIN):Stop f(XCIN) : Oscillation
B
f(XIN):Oscillation f(XCIN):Oscillation System clock; f(XIN)/4 MR=(11002)
g ti
me
MR3 1 MR3 0
(Note 2)
d)
f(XIN):Oscillation f(XCIN):Oscillation System clock; f(XIN) MR=(01002)
F
RAM back-up mode
f(XIN):Stop f(XCIN):Stop
POF2 execution
B,F
Return input 1
B,F
(Stabilizing time a )
B,F
(Stabilizing time a )
POF execution
M 1 0 MRR0 R0 3 M R0 0 M 1 1 MR MR 0 R3 0 M3 (Note 2) 3 1 MR 0
MR0 0
MR0 1
MR0 1
MR0 0
(Note 2)
C
f(XIN):Oscillation f(XCIN):Oscillation System clock; f(XCIN)/4 MR=(11012)
(Stabilizing time c )
G
MR3 1 MR3 0
M MRR1 (St abi 3 0 lizin 1 g
c 1) 1 1 MR 3 MR tim e
POF2 execution
C,G
Return input 1, 2
f(XIN):Oscillation f(XCIN):Oscillation System clock; f(XCIN) MR=(01012)
(Stabilizing time c )
C,G
Return input 1
C,G
(Stabilizing time c ) (Note 1)
C,G
(Stabilizing time b )
MR1 0
MR1 1
MR1 1
(St
ab
POF execution
D ,H
Return input 1, 2
D
f(XIN):Stop f(XCIN):Oscillation System clock; f(XCIN)/4 MR=(11112)
M MR R1 3 1 0
MR1 0
0 0 R1 3 e c ) MR tim M ilizing
POF2 execution
H
f(XIN):Stop f(XCIN):Oscillation System clock; f(XCIN) MR=(01112)
MR3 1 MR3 0
D ,H
Return input 1
D ,H
(Stabilizing time c ) (Note 1)
D ,H
(Stabilizing time b )
Stabilizing time a : An interval required to stabilize the f(XIN) oscillation is automatically generated by hardware. Stabilizing time b : An interval required to stabilize the f(XCIN) oscillation is automatically generated by hardware. Stabilizing time c : Generate an interval required to stabilize the f(XIN) oscillation in state C or G by software at the transition DC, DG, HC, HG, JC, or JG. Stabilizing time d : Generate an interval required to stabilize the f(XCIN) oscillation in state B, F by software at the transition AB, EF, AF, or EB. Return input 1: External wakeup signal (P00-P03, P10-P13) Return input 2: Timer 2 interrupt request flag Notes 1. MR3="1"The microcomputer starts its operation after counting f(XCIN) clock signal 59 to 70 times. MR3="0"The microcomputer starts its operation after counting f(XCIN) clock signal 32 to 43 times. 2. When the following 2 conditions are satisfied, the transition AE, BF, AF, CF, GF represented by " " can be executed. (1) VDD = 2.2 V to 5.5 V (One Time PROM version: VDD = 2.5 V to 5.5 V), f(XIN) 1.0 MHz (2) VDD = 4.5 V to 5.5 V, f(XIN) 2.0 MHz
Fig. 36 State transition
35
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
CLOCK CONTROL
The clock control circuit consists of the following circuits. q Clock generating circuit q Control circuit to stop the clock oscillation q System clock (STCK) selection circuit q Instruction clock (INSTCK) generating circuit q Control circuit to return from the power down state
MR0 Frequency dividing circuit (divided by 4)
XIN XOUT
OSC
MR3
Internal clock 1 0 generating circuit (divided by 3)
Multiplexer
INSTCK
STCK
XCIN XCOUT
POF instruction R S POF2 instruction R S Q Q
MR1
OSC
RESET T2F flag
Falling detected
Fig. 37 Clock control circuit structure (1) Clock control register q Clock control register MR Register MR controls the system clock. Set the contents of this register through register A with the TMRA Table 18 Clock control register Clock control register MR 0 MR3 System clock (STCK) selection bit 1 MR2 MR1 MR0 f(XCIN) oscillation circuit control bit f(XIN) oscillation circuit control bit Clock selection bit 0 1 0 1 at reset : 10002 MR0=0 f(XIN) MR0=1 f(XCIN) MR0=0 f(XIN)/4
Ports P0, P1
instruction. In addition, the TAMR instruction can be used to transfer the contents of register MR to register A.
at power down : state retained
R/W
MR0=1 f(XCIN)/4 f(XCIN) oscillation stop, ports D6 and D7 selected f(XCIN) oscillation enabled, ports D6 and D7 not selected Oscillation enabled Oscillation stop
f(XIN) 0 f(XCIN) 1 Note: "R" represents read enabled, and "W" represents write enabled.
36
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(2) f(XIN) clock generating circuit Clock signal f(XIN) is obtained by externally connecting a ceramic resonator. Connect this external circuit to pins XIN and XOUT at the shortest distance. A feedback resistor is built in between pins XIN and XOUT. (3) f(XCIN) clock generating circuit Clock signal f(XCIN) is obtained by externally connecting a quartz-crystal oscillator. Connect this external circuit to pins XCIN and XCOUT at the shortest distance. A feedback resistor is built in between pins XCIN and XCOUT.
M34551
XIN
CIN
Note: Externally connect a damping resistor Rd depending on the XOUT oscillation frequency. (A feedback resistor is built-in.) Rd Use the resonator manufacturer's recommended value COUT because constants such as capacitance depend on the resonator.
ROM ORDERING METHOD
Please submit the information described below when ordering Mask ROM. (1) M34551M4-XXXFP Mask ROM Order Confirmation Form ..............................................................................................1 (2) Data to be written into mask ROM ......................... EPROM (three sets containing the identical data) (3) Mark Specification Form ..................................................... 1 Fig. 38 Ceramic resonator external circuit
M34551 XCIN
CIN
Note: Externally connect a damping resistor Rd depending on the XCOUT oscillation frequency. (A feedback resistor is built-in.) Rd Use the quartz-crystal oscillator manufacturer's recommended value COUT because constants such as capacitance depend on the quartz-crystal oscillator.
Fig. 39 Quartz-crystal oscillator external circuit
37
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
LIST OF PRECAUTIONS
Noise and latch-up prevention
Connect a capacitor on the following condition to prevent noise and latch-up; * connect a bypass capacitor (approx. 0.1 F) between pins VDD and VSS at the shortest distance, * equalize its wiring in width and length, and * use the thickest wire. In the built-in PROM version, CNVSS pin is also used as VPP pin. Accordingly, when using this pin, connect this pin to VSS through a resistor about 5 k (connect this resistor to CNVSS/ VPP pin as close as possible).
* Use the carrier wave or the carrier wave divided by 2 as the timer 1 count source when the carrier wave output autocontrol function is selected. If the ORCLK is used as the count source, a hazard may occur in port CARR output because ORCLK is not synchronized with the carrier wave.
D5/INT pin
When the interrupt valid waveform of D5/INT pin is changed with the bit 2 of register I1 in software, be careful about the following notes. * Clear the bit 0 of register V1 to "0" and then change the interrupt valid waveform of D5/INT pin with the bit 2 of register I1 (refer to Figure 40). * Clear the bit 2 of register I1 to "0" and execute the SNZ0 instruction to clear the EXF0 flag after executing at least one instruction (refer to Figure 40). Depending on the input state of the D5/INT pin, the external 0 interrupt request flag (EXF0) may be set to "1" when the interrupt valid waveform is changed.
Prescaler
Stop the prescaler operation to change its frequency dividing ratio.
Count source
Stop timer 1 or timer LC counting to change its count source. When timer 2 count source changes from f(XCIN) to ORCLK (W23 = "0" W23 = "1"), the count value of timer 2 is initialized. However, when timer 2 count source changes from ORCLK to f(XCIN) (W23 = "1" W23 = "0") or the same count source is set again (W23 = "0" W23 = "0" or W23 = "1" W23 = "1"), the count value of timer 2 is not initialized.
. . . LA TV1A LA TI1A NOP SNZ0 NOP . . .
4 4
; (!!!02) ; The SNZ0 instruction is valid
Timer 2
Timer 2 has the watchdog timer function (WDT). When timer 2 is used as the WDT, note that the processing to initialize the count value and the execution of the WRST instruction.
; Change of the interrupt valid waveform
;The SNZ0 instruction is executed ! : this bit is not related to the setting of INT.
Reading the count value
Stop the prescaler and then execute the TAB1 instruction to read timer 1 data.
Writing to reload register R1
Write the data to reload register R1 while timer 1 is operating, avoid a timing when timer 1 underflows.
Fig. 40 External 0 interrupt program example
One Time PROM version
The operating power voltage of the One Time PROM version is within the range of 2.5 V to 5.5 V.
Notes when using the carrier wave output auto-control function
* Execute the STCR instruction after setting the timer 1 and register C2 in order to start the carrier generating circuit operation. * Stop the timer 1 (W20="0") after stopping the carrier generating circuit (SPCR instruction executed) while the carrier wave output is disabled in order to stop the carrier wave output auto-control operation. * If the carrier wave output auto-control function is invalidated (C20="0") while the carrier wave output is auto-controlled, the output of port CARR retains the state when the autocontrol is invalidated regardless of timer 1 underflow. This state is released by timer 1 stop (W20="0"). When the carrier wave output auto-control function is validated (C20="1") again after it is invalidated (C20="0"), the auto-control of carrier wave output is started again when the next timer 1 underflow occurs. However, when the carrier wave output auto-control bit is changed during timer 1 underflow, the error-operation may occur.
Multifunction
Note that the port D5 output function can be used even when INT function is selected.
11 Power
down instruction (POF instruction, POF2 instruction) Execute the POF or POF2 instruction immediately after executing the EPOF instruction to enter the power down state. Note that system cannot enter the power down state when executing only the POF or POF2 instruction. counter Make sure that the PCH does not specify after the last page of the built-in ROM.
12 Program
38
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
LIST OF INSTRUCTION FUNCTION
Grouping
Mnemonic TAB TBA TAY TYA TEAB
Function (A) (B) (B) (A) (A) (Y) (Y) (A) (E7-E4) (B)
Grouping
RAM to register transfer
(Y) (Y) + 1 TMA j (M(DP)) (A) (X) (X)EXOR(j) j = 0 to 15 LA n (A) n n = 0 to 15
Bit operation
Function Mnemonic (A) (M(DP)) XAMI j (X) (X)EXOR(j) j = 0 to 15
Grouping
Mnemonic SB j
Function (Mj(DP)) 1 j = 0 to 3
RB j
(Mj(DP)) 0 j = 0 to 3
SZB j
(Mj(DP)) = 0 ? j = 0 to 3
Register to register transfer
TABE
(B) (E7-E4) (A) (E3-E0) TABP p (SP) (SP) + 1 (SK(SP)) (PC) (PCH) p (PCL) (DR2-DR0, A3-A0) (B) (ROM(PC))7 to 4 (A) (ROM(PC))3 to 0 (PC) (SK(SP)) (SP) (SP) - 1 AM Arithmetic operation AMC (A) (A) + (M(DP))
Comparison operation
(E3-E0) (A)
SEAM SEA n
(A) = (M(DP)) ? (A) = n ? n = 0 to 15
TDA TAD
(DR2-DR0) (A2-A0) (A2-A0) (DR2-DR0) (A3) 0 (A1, A0) (Z1, Z0) (A3, A2) 0 (A) (X) (A2-A0) (SP2-SP0) (A3) 0 (X) x, x = 0 to 15 (Y) y, y = 0 to 15 (Z) z, z = 0 to 3 AND
Ba Branch operation BL p, a
(PCL) a6-a0 (PCH) p (PCL) a6-a0 (PCH) p (PCL) (DR2-DR0, A3-A0)
TAZ
BLA p
TAX TASP
BM a (A) (A) + (M(DP)) + (CY) (CY) Carry An (A) (A) + n n = 0 to 15 (A) (A)AND(M(DP)) (A) (A)OR(M(DP)) (CY) 1 (CY) 0 (CY) = 0 ? (A) (A) CY A3A2A1A0 RTI Subroutine operation
(SP) (SP) + 1 (SK(SP)) (PC) (PCH) 2 (PCL) a6-a0
LXY x, y RAM addresses
BML p, a (SP) (SP) + 1 (SK(SP)) (PC) (PCH) p (PCL) a6-a0 BMLA p (SP) (SP) + 1 (SK(SP)) (PC) (PCH) p (PCL) (DR2-DR0, A3-A0) (PC) (SK(SP)) (SP) (SP) - 1
LZ z INY DEY TAM j
(Y) (Y) + 1 OR (Y) (Y) - 1 SC (A) (M(DP)) (X) (X)EXOR(j) j = 0 to 15 RC SZC
RAM to register transfer
XAM j
(A) (M(DP)) Return operation (X) (X)EXOR(j) j = 0 to 15 RAR CMA RT
(PC) (SK(SP)) (SP) (SP) - 1
XAMD j
(A) (M(DP)) (X) (X)EXOR(j) j = 0 to 15 (Y) (Y) - 1
RTS
(PC) (SK(SP)) (SP) (SP) - 1
39
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
LIST OF INSTRUCTION FUNCTION (CONTINUED)
Grouping
Mnemonic DI EI SNZ0
Function (INTE) 0 (INTE) 1
Grouping
Mnemonic TLCA
Function (TLC) (A) (RLC) (A) (T1F) = 1 ? After skipping the next instruction, (T1F) 0
Grouping
Carrier wave generating operation
Mnemonic Function TC1A (C1) (A) STCR Carrier wave generating start Carrier wave generating stop (C20) (A0)
SNZT1 (EXF0) = 1 ? After skipping the next Interrupt operation instruction, (EXF0) 0 SNZI0 I12 = 1 : (INT0) = "H" ? I12 = 0 : (INT0) = "L" ? (A) (V1) IAP0 TV1A TAI1 TI1A TAW1 TW1A TAW2 TW2A TAW3 TW3A TAB1 (V1) (A) OP0A (A) (I1) IAP1 (I1) (A) OP1A (A) (W1) (W1) (A) (A) (W2) (W2) (A) (A1, A0) (W31, W30) (W31, W30) (A1, A0) TPU0A Timer operation (B) (T17-T14) (A) (T13-T10) T1AB at timer 1 stop (W20=0) LCD control operation (R17-R14) (B) (T17-T14) (B) (R13-R10) (A) (T13-T10) (A) At timer 1 operating (W20=1), (R17-R14) (B) (R13-R10) (A) TAPU0 TL1A TAL1 TL2A Input/Output operation IAP2 CLD RD Timer operation
SPCR
SNZT2
(T2F) = 1 ? After skipping the next instruction, (T2F) 0
TC2A
NOP POF
(PC) (PC) + 1 Transition to clock operating mode
TAV1
(A) (P0) (P0) (A)
POF2 (A) (P1) (P1) (A) Other operation (A) (P2) (D) 1 (D(Y)) 0 (Y) = 0 to 9 SD (D(Y)) 1 (Y) = 0 to 9 TAV2 (PU0) (A) TV2A (A) (PU0) (L1) (A) (A) (L1) (L2) (A) TAMR TMRA EPOF
Transition to RAM back-up mode Power down instruction (POF, POF2) valid
SNZP WRST
(P) = 1 ? (WDF) 0, (WEF) 1 (A) (MR) (MR) (A) (A) (V2) (V2) (A)
40
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
INSTRUCTION CODE TABLE
D9-D4 000000 000001 000010 000011 000100000101000110 000111001000 001001001010001011 001100 001101001110 001111 D3- D0 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Hex. notation 010000011000 010111011111 10-17 18-1F
00 NOP - POF
01 BLA CLD -
02
03
04 - - - - RT
05 TASP TAD TAX TAZ TAV1
06 A 0 A 1 A 2 A 3 A 4 A 5 A 6 A 7 A 8 A 9 A 10
07 LA 0 LA 1 LA 2 LA 3 LA 4 LA 5 LA 6 LA 7 LA 8 LA 9 LA 10 LA 11 LA 12 LA 13 LA 14 LA 15
08
09
0A
0B
0C
0D
0E BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL
0F BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL BL
0 1 2 3 4 5 6 7 8 9 A B C D E F
SZB BMLA 0 SZB 1 SZB 2 SZB 3 - - - - - - - - SNZ0 -
TABP TABP TABP TABP 0 16 32* 48* BML BML TABP TABP TABP TABP BML BML 1 17 33* 49* TABP TABP TABP TABP BML BML 2 18 34* 50* TABP TABP TABP TABP BML BML 3 19 35* 51* TABP TABP TABP TABP BML BML 20 4 36* 52* TABP TABP TABP TABP BML BML 5 21 37* 53* TABP TABP TABP TABP BML 38* 54* BML 6 22 TABP TABP TABP TABP BML 39* 55* BML 7 23 TABP TABP TABP TABP BML BML 8 24 40* 56* TABP TABP TABP TABP 41* 57* BML BML 9 25 TABP TABP TABP TABP 10 26 42* 58* BML BML TABP TABP TABP TABP 11 43* 59* BML BML 27 TABP TABP TABP TABP 12 28 44* 60* BML BML TABP TABP TABP TABP 13 45* 61* BML BML 29 TABP TABP TABP TABP 14 46* 62* BML BML 30 TABP TABP TABP TABP BML BML 15 31 47* 63*
BM BM BM BM BM BM BM BM BM BM BM BM BM BM BM BM
B B B B B B B B B B B B B B B B
SNZP INY DI EI RC SC RD
SD SEAn - DEY SEAM - - TDA
RTS TAV2 RTI - LZ 0 LZ 1 LZ 2 LZ 3 RB 0 RB 1 RB 2 RB 3 - - - - -
POF2 AND - OR
AM TEAB TABE SNZI0 AMC - - - - - - - - TV2A
A EPOF 11 SB 0 SB 1 SB 2 SB 3 A 12 A 13 A 14 A 15
TYA CMA - TBA - RAR TAB
TAY SZC TV1A
The above table shows the relationship between machine language codes and machine language instructions. D3-D0 show the low-order 4 bits of the machine language code, and D9-D4 show the high-order 6 bits of the machine language code. The hexadecimal representation of the code is also provided. There are one-word instructions and two-word instructions, but only the first word of each instruction is shown. Do not use code marked "-." The codes for the second word of a two-word instruction are described below. * cannot be used at M34551M4. The second word BL BML BLA BMLA SEA SZD 10 paaa 10 paaa 10 pp00 10 pp00 00 0111 00 0010 aaaa aaaa pppp pppp nnnn 1011
41
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
INSTRUCTION CODE TABLE (CONTINUED)
D9-D4 100000 100001100010 100011100100 100101100110 100111101000 101001101010 101011101100 101101101110 101111 D3- D0 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Hex. notation 110000 111111
20 - - - - - - - - - - TL1A TL2A - TLCA TW1A TW2A
21
22
23
24 - - - - - - - - - - TAL1 TAW1 TAW2 TAW3 - -
25 - -
26
27
28
29 - - - - - - - -
2A WRST - - - - - - -
2B
2C
2D
2E
2F
30-3F
0 1 2 3 4 5 6 7 8 9 A B C D E F
TW3A OP0A T1AB - - - - - TMRA TI1A - - - - - - - - OP1A - - - - - - - - - - -
TPU0A
IAP0 TAB1 SNZT1 IAP1 - - - - - - - - - - - - - - -
SNZT2
TMA TAM XAM XAMI XAMD LXY 0 0 0 0 0 TMA TAM XAM XAMI XAMD LXY 1 1 1 1 1 TMA TAM XAM XAMI XAMD LXY 2 2 2 2 2 TMA TAM XAM XAMI XAMD LXY 3 3 3 3 3 TMA TAM XAM XAMI XAMD LXY 4 4 4 4 4 TMA TAM XAM XAMI XAMD LXY 5 5 5 5 5 TMA TAM XAM XAMI XAMD LXY 6 6 6 6 6 TMA TAM XAM XAMI XAMD LXY 7 7 7 7 7 TMA TAM XAM XAMI XAMD LXY 8 8 8 8 8 TMA TAM XAM XAMI XAMD LXY 9 9 9 9 9 TMA TAM XAM XAMI XAMD LXY 10 10 10 10 10 TMA TAM XAM XAMI XAMD LXY 11 11 11 11 11 TMA TAM XAM XAMI XAMD LXY 12 12 12 12 12 TMA TAM XAM XAMI XAMD LXY 13 13 13 13 13 TMA TAM XAM XAMI XAMD LXY 14 14 14 14 14 TMA TAM XAM XAMI XAMD LXY 15 15 15 15 15
- - - - - - - - - - - - - - -
TAMR IAP2 TAI1 - - -
TAPU0
- - - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - -
STCR TC1A SPCR TC2A - - - - - - - - - - - -
- -
The above table shows the relationship between machine language codes and machine language instructions. D3-D0 show the low-order 4 bits of the machine language code, and D9-D4 show the high-order 6 bits of the machine language code. The hexadecimal representation of the code is also provided. There are one-word instructions and two-word instructions, but only the first word of each instruction is shown. Do not use code marked "-." The codes for the second word of a two-word instruction are described below. The second word BL BML BLA BMLA SEA SZD 10 10 10 10 00 00 paaa paaa pp00 pp00 0111 0010 aaaa aaaa pppp pppp nnnn 1011
42
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MACHINE INSTRUCTIONS
Parameter
Type of instructions
Instruction code Mnemonic D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
Hexadecimal notation
Number of words Number of cycles
Function
TAB TBA TAY TYA TEAB Register to register transfer
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 0 1 0 1
1 1 1 1 1
1 1 1 1 0
1 1 1 0 1
0 0 1 0 0
0 0 0 0 0
1 0 1 0 1
E E F C A
1 1 1 1 1
1 1 1 1 1
(A) (B) (B) (A) (A) (Y) (Y) (A) (E7-E4) (B) (E3-E0) (A)
TABE
0
0
0
0
1
0
1
0
1
0
0
2
A
1
1
(B) (E7-E4) (A) (E3-E0)
TDA TAD
0 0
0 0
0 0
0 1
1 0
0 1
1 0
0 0
0 0
1 1
0 0
2 5
9 1
1 1
1 1
(DR2-DR0) (A2-A0) (A2-A0) (DR2-DR0) (A3) 0
TAZ
0
0
0
1
0
1
0
0
1
1
0
5
3
1
1
(A1, A0) (Z1, Z0) (A3, A2) 0
TAX TASP
0 0
0 0
0 0
1 1
0 0
1 1
0 0
0 0
1 0
0 0
0 0
5 5
2 0
1 1
1 1
(A) (X) (A2-A0) (SP2-SP0) (A3) 0 (X) x, x = 0 to 15 (Y) y, y = 0 to 15
LXY x, y
1
1
x3 x2 x1 x0 y3 y2 y1 y0
3
x
y
1
1
RAM addresses
LZ z
0
0
0
1
0
0
1
0
z1 z0
0
4
8 +z
1
1
(Z) z, z = 0 to 3
INY
0
0
0
0
0
1
0
0
1
1
0
1
3
1
1
(Y) (Y) + 1
DEY
0
0
0
0
0
1
0
1
1
1
0
1
7
1
1
(Y) (Y) - 1
43
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Skip condition
Carry flag CY
Detailed description
- - - - -
- - - - -
Transfers the contents of register B to register A. Transfers the contents of register A to register B. Transfers the contents of register Y to register A. Transfers the contents of register A to register Y. Transfers the contents of registers A and B to register E.
-
-
Transfers the contents of register E to registers A and B.
- -
- -
Transfers the contents of register A to register D. Transfers the contents of register D to register A.
-
-
Transfers the contents of register Z to register A.
- -
- -
Transfers the contents of register X to register A. Transfers the contents of stack pointer (SP) to register A.
Continuous description
-
Loads the value x in the immediate field to register X, and the value y in the immediate field to register Y. When the LXY instructions are continuously coded and executed, only the first LXY instruction is executed and other LXY instructions coded continuously are skipped.
-
-
Loads the value z in the immediate field to register Z.
(Y) = 0
-
Adds 1 to the contents of register Y. As a result of addition, when the contents of register Y is 0, the next instruction is skipped.
(Y) = 15
-
Subtracts 1 from the contents of register Y. As a result of subtraction, when the contents of register Y is 15, the next instruction is skipped.
44
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MACHINE INSTRUCTIONS (CONTINUED)
Parameter
Type of instructions
Instruction code Mnemonic D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
Hexadecimal notation
Number of words Number of cycles
Function
TAM j
1
0
1
1
0
0
j
j
j
j
2C
j
1
1
(A) (M(DP)) (X) (X)EXOR(j) j = 0 to 15
XAM j
1
0
1
1
0
1
j
j
j
j
2D
j
1
1
(A) (M(DP)) (X) (X)EXOR(j) j = 0 to 15
RAM to register transfer
XAMD j
1
0
1
1
1
1
j
j
j
j
2F
j
1
1
(A) (M(DP)) (X) (X)EXOR(j) j = 0 to 15 (Y) (Y) - 1
XAMI j
1
0
1
1
1
0
j
j
j
j
2E
j
1
1
(A) (M(DP)) (X) (X)EXOR(j) j = 0 to 15 (Y) (Y) + 1
TMA j
1
0
1
0
1
1
j
j
j
j
2B
j
1
1
(M(DP)) (A) (X) (X)EXOR(j) j = 0 to 15
LA n
0
0
0
1
1
1
n
n
n
n
07
n
1
1
(A) n n = 0 to 15
Arithmetic operation
TABP p
0
0
1
0
p5 p4 p3 p2 p1 p0
08 +p
p
1
3
(SP) (SP) + 1 (SK(SP)) (PC) (PCH) p (PCL) (DR2-DR0, A3-A0) (B) (ROM(PC))7 to 4 (A) (ROM(PC))3 to 0 (PC) (SK(SP)) (SP) (SP) - 1 (Note)
Note: p is 0 to 31 for M34551M4 and p is 0 to 63 for M34551E8.
45
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Skip condition
Carry flag CY
Detailed description
-
-
After transferring the contents of M(DP) to register A, an exclusive OR operation is performed between register X and the value j in the immediate field, and stores the result in register X.
-
-
After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is performed between register X and the value j in the immediate field, and stores the result in register X.
(Y) = 15
-
After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is performed between register X and the value j in the immediate field, and stores the result in register X. Subtracts 1 from the contents of register Y. As a result of subtraction, when the contents of register Y is 15, the next instruction is skipped.
(Y) = 0
-
After exchanging the contents of M(DP) with the contents of register A, an exclusive OR operation is performed between register X and the value j in the immediate field, and stores the result in register X. Adds 1 to the contents of register Y. As a result of addition, when the contents of register Y is 0, the next instruction is skipped.
-
-
After transferring the contents of register A to M(DP), an exclusive OR operation is performed between register X and the value j in the immediate field, and stores the result in register X.
Continuous description
-
Loads the value n in the immediate field to register A. When the LA instructions are continuously coded and executed, only the first LA instruction is executed and other LA instructions coded continuously are skipped.
-
-
Transfers bits 7 to 4 to register B and bits 3 to 0 to register A. These bits 7 to 0 are the ROM pattern in address (DR2 DR1 DR0 A3 A2 A1 A0)2 specified by registers A and D in page p. When this instruction is executed, 1 stage of stack register is used.
46
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MACHINE INSTRUCTIONS (CONTINUED)
Parameter
Type of instructions
Instruction code Mnemonic D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
Hexadecimal notation
Number of words Number of cycles
Function
AM
0
0
0
0
0
0
1
0
1
0
00A
1
1
(A) (A) + (M(DP))
AMC
0
0
0
0
0
0
1
0
1
1
00B
1
1
(A) (A) + (M(DP))+ (CY) (CY) Carry
An
0
0
0
1
1
0
n
n
n
n
06n
1
1
(A) (A) + n n = 0 to 15
Arithmetic operation
AND
0
0
0
0
0
1
1
0
0
0
018
1
1
(A) (A)AND(M(DP))
OR
0
0
0
0
0
1
1
0
0
1
019
1
1
(A) (A)OR(M(DP))
SC RC SZC CMA RAR SB j Bit operation
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 1
0 0 1 0 0 0
0 0 0 1 1 1
0 0 1 1 1 1
1 1 1 1 1 1
1 1 1 0 0 j
1 0 1 0 1 j
007 006 02F 01C 01D 05 C +j C +j j
1 1 1 1 1 1
1 1 1 1 1 1
(CY) 1 (CY) 0 (CY) = 0 ? (A) (A) CY A3A2A1A0 (Mj(DP)) 1 j = 0 to 3 (Mj(DP)) 0 j = 0 to 3 (Mj(DP)) = 0 ? j = 0 to 3 (A) = (M(DP)) ? (A) = n ? n = 0 to 15
RB j
0
0
0
1
0
0
1
1
j
j
04
1
1
SZB j
0
0
0
0
1
0
0
0
j
j
02
1
1
Comparison
SEAM operation SEA n
0 0 0
0 0 0
0 0 0
0 0 1
1 1 1
0 0 1
0 0 n
1 1 n
1 0 n
0 1 n
02 02 07
6 5 n
1 2
1 2
47
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Skip condition
Carry flag CY
Detailed description
-
-
Adds the contents of M(DP) to register A. Stores the result in register A. The contents of carry flag CY remains unchanged.
-
0/1 Adds the contents of M(DP) and carry flag CY to register A. Stores the result in register A and carry flag CY.
Overflow = 0
-
Adds the value n in the immediate field to register A. The contents of carry flag CY remains unchanged. Skips the next instruction when there is no overflow as the result of operation.
-
-
Performs the AND operation between the contents of register A and the contents of M(DP), and stores the result in register A.
-
-
Performs the OR operation between the contents of register A and the contents of M(DP), and stores the result in register A.
- - (CY) = 0 - - -
1 0 - -
Sets carry flag CY to "1." Clears carry flag CY to "0." Skips the next instruction when the contents of carry flag CY is "0." Stores the one's complement for register A's contents in register A.
0/1 Rotates the contents of register A including the contents of carry flag CY to the right by 1 bit. - Sets the contents of bit j (bit specified by the value j in the immediate field) of M(DP) to "1."
-
-
Clears the contents of bit j (bit specified by the value j in the immediate field) of M(DP) to "0."
(Mj(DP)) = 0 j = 0 to 3 (A) = (M(DP)) (A) = n
-
Skips the next instruction when the contents of bit j (bit specified by the value j in the immediate field) of M(DP) is "0." Skips the next instruction when the contents of register A is equal to the contents of M(DP). Skips the next instruction when the contents of register A is equal to the value n in the immediate field.
- -
48
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MACHINE INSTRUCTIONS (CONTINUED)
Parameter
Type of instructions
Instruction code Mnemonic D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
Hexadecimal notation
Number of words Number of cycles
Function
Ba
0
1
1
a6 a5 a4 a3 a2 a1 a0
18 a +a 0Ep +p 2p a +a 01 2p 1a 0 p a
1
1
(PCL) a6-a0
Branch operation
BL p, a
0
0
1
1
1
p4 p3 p2 p1 p0
2
2
(PCH) p (PCL) a6-a0 (Note)
1
0
p5 a6 a5 a4 a3 a2 a1 a0
BLA p
0 1
0 0 1
0
0
0
1 0
0
0
0
0
2
2
(PCH) p (PCL) (DR2-DR0, A3-A0) (Note)
p5 p4 0 0
p3 p2 p1 p0
BM a
0
a6 a5 a4 a3 a2 a1 a0
1
1
(SP) (SP) + 1 (SK(SP)) (PC) (PCH) 2 (PCL) a6-a0
Subroutine operation
BML p, a
0
0
1
1
0
p4 p3 p2 p1 p0
0Cp +p 2pa +a 03 2p 0 p
2
2
(SP) (SP) + 1 (SK(SP)) (PC) (PCH) p (PCL) a6-a0 (Note)
1
0
p5 a6 a5 a4 a3 a2 a1 a0
BMLA p
0 1
0 0
0
0
1
1 0
0
0
0
0
2
2
(SP) (SP) + 1 (SK(SP)) (PC) (PCH) p (PCL) (DR2-DR0, A3-A0) (Note)
p5 p4 0
p3 p2 p1 p0
RTI Return operation
0
0
0
1
0
0
0
1
1
0
04
6
1
1
(PC) (SK(SP)) (SP) (SP) - 1
RT
0
0
0
1
0
0
0
1
0
0
04
4
1
2
(PC) (SK(SP)) (SP) (SP) - 1
RTS
0
0
0
1
0
0
0
1
0
1
04
5
1
2
(PC) (SK(SP)) (SP) (SP) - 1
Note: p is 0 to 31 for M34551M4 and p is 0 to 63 for M34551E8.
49
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Skip condition
Carry flag CY
Detailed description
-
-
Branch within a page : Branches to address a in the identical page.
-
-
Branch out of a page : Branches to address a in page p.
-
-
Branch out of a page : Branches to address (DR2 DR1 DR0 A3 A2 A1 A0)2 specified by registers D and A in page p.
-
-
Call the subroutine in page 2 : Calls the subroutine at address a in page 2.
-
-
Call the subroutine : Calls the subroutine at address a in page p.
-
-
Call the subroutine : Calls the subroutine at address (DR2 DR1 DR0 A3 A2 A1 A0)2 specified by registers D and A in page p.
-
-
Returns from interrupt service routine to main routine. Returns each value of data pointer (X, Y, Z), carry flag, skip status, NOP mode status by the continuous description of the LA/LXY instruction, register A and register B to the states just before interrupt.
-
-
Returns from subroutine to the routine called the subroutine.
Skip unconditionally
-
Returns from subroutine to the routine called the subroutine, and skips the next instruction unconditionally.
50
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MACHINE INSTRUCTIONS (CONTINUED)
Parameter
Type of instructions
Instruction code Mnemonic D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
Hexadecimal notation
Number of words Number of cycles
Function
DI EI SNZ0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 1
0 0 1
0 0 1
1 1 0
0 0 0
0 1 0
00 00 03
4 5 8
1 1 1
1 1 1
(INTE) 0 (INTE) 1 (EXF0) = 1 ? After skipping the next instruction, (EXF0) 0
Interrupt operation
SNZI0
0
0
0
0
1
1
1
0
1
0
03
A
1
1
I12 = 1 : (INT) = "H" ?
I12 = 0 : (INT) = "L" ?
TAV1 TV1A TAI1 TI1A SNZT1
0 0 1 1 1
0 0 0 0 0
0 0 0 0 1
1 0 1 0 0
0 1 0 0 0
1 1 1 1 0
0 1 0 0 0
1 1 0 1 0
0 1 1 1 0
0 1 1 1 0
054 03F 253 217 280
1 1 1 1 1
1 1 1 1 1
(A) (V1) (V1) (A) (A) (I1) (I1) (A) (T1F) = 1 ? After skipping the next instruction (T1F) 0
SNZT2
1
0
1
0
0
0
0
0
0
1
281
1
1
(T2F) = 1 ? After skipping the next instruction (T2F) 0
Timer operation
TAW1 TW1A TAW2 TW2A TAW3 TW3A
1 1 1 1 1 1
0 0 0 0 0 0
0 0 0 0 0 0
1 0 1 0 1 0
0 0 0 0 0 0
0 0 0 0 0 1
1 1 1 1 1 0
0 1 1 1 1 0
1 1 0 1 0 0
1 0 0 1 1 0
24B 20E 24C 20F 24D 210
1 1 1 1 1 1
1 1 1 1 1 1
(A) (W1) (W1) (A) (A) (W2) (W2) (A) (A1, A0) (W31, W30) (W31, W30) (A1, A0)
51
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Skip condition
Carry flag CY
Detailed description
- - (EXF0) = 1
- - -
Clears the interrupt enable flag INTE to "0," and disables the interrupt. Sets the interrupt enable flag INTE to "1," and enables the interrupt. Skips the next instruction when the contents of EXF0 flag is "1." After skipping, clears the EXF0 flag to "0."
(INT) = "H" However, I12 = 1 (INT) = "L" However, I12 = 0 - - - - (T1F) = 1
-
When bit 2 (I12) of register I1 is "1" : Skips the next instruction when the level of INT pin is "H."
-
When bit 2 (I12) of register I1 is "0" : Skips the next instruction when the level of INT pin is "L."
- - - - -
Transfers the contents of interrupt control register V1 to register A. Transfers the contents of register A to interrupt control register V1. Transfers the contents of interrupt control register I1 to register A. Transfers the contents of register A to interrupt control register I1. Skips the next instruction when the contents of T1F flag is "1." After skipping, clears T1F flag.
(T2F) =1
-
Skips the next instruction when the contents of T2F flag is "1." After skipping, clears T2F flag.
- - - - - -
- - - - - -
Transfers the contents of timer control register W1 to register A. Transfers the contents of register A to timer control register W1. Transfers the contents of timer control register W2 to register A. Transfers the contents of register A to timer control register W2. Transfers the contents of timer control register W3 to register A. Transfers the contents of register A to timer control register W3.
52
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MACHINE INSTRUCTIONS (CONTINUED)
Parameter
Type of instructions
Instruction code Mnemonic D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
Hexadecimal notation
Number of words Number of cycles
Function
TAB1
1
0
0
1
1
1
0
0
0
0
270
1
1
(B) (T17-T14) (A) (T13-T10)
T1AB Timer operation
1
0
0
0
1
1
0
0
0
0
230
1
1
At timer 1 stop (W20=0), (R17-R14) (B) (T17-T14) (B) (R13-R10) (A) (T13-T10) (A) At timer 1 operating (W20=1), (R17-R14) (B) (R13-R10) (A)
TLCA
1
0
0
0
0
0
1
1
0
1
20D
1
1
(TLC) (A) (RLC) (A)
IAP0 OP0A IAP1 OP1A Input/Output operation IAP2
1 1 1 1 1
0 0 0 0 0
0 0 0 0 0
1 0 1 0 1
1 1 1 1 1
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 1
0 0 1 1 0
260 220 261 221 262
1 1 1 1 1
1 1 1 1 1
(A) (P0) (P0) (A) (A) (P1) (P1) (A) (A) (P2)
CLD RD
0 0
0 0
0 0
0 0
0 0
1 1
0 0
0 1
0 0
1 0
011 014
1 1
1 1
(D) 1 (D(Y)) 0 (Y) = 0 to 9 (D(Y)) 1 (Y) = 0 to 9 (PU0) (A) (A) (PU0)
SD
0
0
0
0
0
1
0
1
0
1
015
1
1
TPU0A TAPU0
1 1
0 0
0 0
0 1
1 0
0 1
1 0
1 1
0 1
1 1
22D 257
1 1
1 1
53
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Skip condition
Carry flag CY
Detailed description
-
-
Transfers the contents of timer 1 to registers A and B.
-
-
When stopping (W20=0), transfers the contents of registers A and B to timer 1 and timer 1 reload register. When operating (W20=1), transfers the contents of registers A and B only to timer 1 reload register.
-
-
Transfers the contents of register A to timer LC and timer LC reload register.
- - - - -
- - - - -
Transfers the input of port P0 to register A. Outputs the contents of register A to port P0. Transfers the input of port P1 to register A. Outputs the contents of register A to port P1. Transfers the input of port P2 to register A.
- -
- -
Sets port D to "1." Clears a bit of port D specified by register Y to "0."
-
-
Sets a bit of port D specified by register Y to "1."
- -
- -
Transfers the contents of register A to pull-up control register PU0. Transfers the contents of pull-up control register PU0 to register A.
54
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
MACHINE INSTRUCTIONS (CONTINUED)
Parameter
Type of instructions
Instruction code Mnemonic D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
Hexadecimal notation
Number of words Number of cycles
Function
TL1A LCD control operation TAL1 TL2A TC1A STCR SPCR TC2A NOP POF
1 1 1 1 1 1 1 0 0
0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 0 0
0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 1 0 0
0 0 0 0 1 1 0 0 0
1 1 1 1 1 1 1 0 0
0 0 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 1
0 0 1 0 0 1 1 0 0
20A 24A 20B 2A8 298 299 2A9 000 002
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
(L1) (A) (A) (L1) (L2) (A) (C1) (A) Carrier wave generating start Carrier wave generating stop (C20) (A0) (PC) (PC) + 1 Transition to clock operating mode
Carrier generating circuit operation
POF2
0
0
0
0
0
0
1
0
0
0
008
1
1
Transition to RAM back-up mode
EPOF Other operation
0
0
0
1
0
1
1
0
1
1
0
5B
1
1
Power down instruction (POF, POF2) valid
SNZP
0
0
0
0
0
0
0
0
1
1
003
1
1
(P) = 1 ?
WRST TAMR TMRA TAV2 TV2A
1 1 1 0 0
0 0 0 0 0
1 0 0 0 0
0 1 0 1 0
1 0 0 0 1
0 1 1 1 1
0 0 0 0 1
0 0 1 1 1
0 1 1 0 1
0 0 0 1 0
2A0 252 216 055 03E
1 1 1 1 1
1 1 1 1 1
(WDF) 0, (WEF) 1 (A) (MR) (MR) (A) (A) (V2) (V2) (A)
55
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Skip condition
Carry flag CY
Detailed description
- - - - - - - - -
- - - - - - - - -
Transfers the contents of register A to LCD control register L1. Transfers the contents of register L1 to register A. Transfers the contents of register A to LCD control register L2. Transfers the contents of register A to carrier wave selection register C1. Starts generating carrier wave. Stops generating carrier wave. Transfers the contents of register A to carrier wave output control register C2. No operation Puts the system in clock operating mode state by executing the POF instruction after executing the EPOF instruction. f(XCIN) oscillation, LCD, timer LC and timer 2 are operated.
-
-
Puts the system in RAM back-up mode state by executing the POF2 instruction after executing the EPOF instruction. Oscillation is stopped.
-
-
Validates the power down instruction (POF, POF2) which is executed after the EPOF instruction by executing the EPOF instruction.
(P) = 1
-
Skips the next instruction when P flag is "1." After skipping, P flag remains unchanged.
- - - - -
- - - - -
Operates the watchdog timer and initializes the watchdog timer flag (WDF). Transfers the contents of clock control register MR to register A. Transfers the contents of register A to clock control register MR. Transfers the contents of general-purpose register V2 to register A. Transfers the contents of register A to general-purpose register V2.
56
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
SYMBOL
The symbols shown below are used in the following list of instruction function and machine instructions. Symbol A B DR E V1 V2 I1 W1 W2 W3 C1 C2 CR L1 L2 PU0 MR X Y Z DP PC PCH PCL SK SP CY R1 R2 RLC STCK INSTK T1 T2 TLC Register A (4 bits) Register B (4 bits) Register D (3 bits) Register E (8 bits) Interrupt control register V1 (4 bits) General-purpose register V2 (4 bits) Interrupt control register I1 (4 bits) Timer control register W1 (4 bits) Timer control register W2 (4 bits) Timer control register W3 (2 bits) Carrier wave selection register C1 (4 bits) Carrier wave output control register C2 (1 bit) Carrier wave generating control flag LCD control regiser L1 LCD control register L2 Pull-up control register PU0 (4 bits) Clock control register MR (4 bits) Register X (4 bits) Register Y (4 bits) Register Z (2 bits) Data pointer (10 bits) (It consists of registers X, Y, and Z) Program counter (14 bits) High-order 7 bits of program counter Low-order 7 bits of program counter Stack register (14 bits ! 8) Stack pointer (3 bits) Carry flag Timer 1 reload register Timer 2 reload register Timer LC reload register System clock Instruction clock Timer 1 Timer 2 Timer LC A3A2A1A0 D P0 P1 P2 x y z p n i j Port D (8 bits) Port P0 (4 bits) Port P1 (4 bits) Port P2 (4 bits) Hexadecimal variable Hexadecimal variable Hexadecimal variable Hexadecimal variable Hexadecimal constant which represents the immediate value Hexadecimal constant which represents the immediate value Hexadecimal constant which represents the immediate value Binary notation of hexadecimal variable A (same for others) Direction of data movement Data exchange between a register and memory Decision of state shown before "?" Contents of registers and memories Negate, Flag unchanged after executing instruction RAM address pointed by the data pointer Label indicating address a6 a5 a4 a3 a2 a1 a0 Label indicating address a6 a5 a4 a3 a2 a1 a0 in page p5 p4 p3 p2 p1 p0 Hex. C + Hex. number x (also same for others) Contents Symbol WDF INTE EXF0 P Contents Watchdog timer flag Interrupt enable flag External 0 interrupt request flag Power down flag
? () -- M(DP) a p, a C +
x Timer 1 interrupt request flag T1F Timer 2 interrupt request flag T2F Note : The 4551 Group just invalidates the next instruction when a skip is performed. The contents of program counter is not increased by 2. Accordingly, the number of cycles does not change even if skip is not performed. However, the cycle count becomes "1" if the TABP p, RT, or RTS instruction is skipped.
57
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
CONTROL REGISTERS
Interrupt control register V1 V13 V12 V11 V10 Timer 2 interrupt enable bit Timer 1 interrupt enable bit Not used External 0 interrupt enable bit 0 1 0 1 0 1 0 1 at reset : 00002 at power down : 00002 R/W
Interrupt disabled (SNZT2 instruction is valid) Interrupt enabled (SNZT2 instruction is invalid) Interrupt disabled (SNZT1 instruction is valid) Interrupt enabled (SNZT1 instruction is invalid) This bit has no function, but read/write is enabled. Interrupt disabled (SNZ0 instruction is valid) Interrupt enabled (SNZ0 instruction is invalid)
Timer control register W1 W13 W12 Prescaler control bit Prescaler dividing ratio selection bit 0 1 0 1
at reset : 00002
at power down : 00002
R/W
Stop (prescaler state initialized) Operating Instruction clock (INSTCK) divided by 4 Instruction clock (INSTCK) divided by 8 Count source Prescaler output (ORCLK) Carrier output (CARRY) Carrier output divided by 2 (CARRY/2) 0 1 0 1
W11 W10
W11 Timer 1 count source selection bits W10
0 0 1 1
Timer control register W2 W23 Timer 2 count source selection bit 0 1
at reset : 10002 f(XCIN)
at power down : - - - 02
R/W
Prescaler output (ORCLK) Count source Underflow occur every 214 count Underflow occur every 213 count Not available Not available Stop (timer 1 state retained) Operating 0 1 0 1
W22 W21
W22 Timer 2 count value selection bits W21
0 0 1 1 Timer 1 control bit 0 1
W20
Timer control register W3 W31 Timer LC count source selection bit 0 1
at reset : 002
at power down : state retained
R/W
Bit 3 of timer 2 is output (timer 2 count source divided by 16) State clock (STCK)
0 Stop (timer LC state retained) Timer LC control bit W30 1 Operating Note: "R" represents read enabled, and "W" represents write enabled. "-" represents state retained.
58
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
CONTROL REGISTERS (CONTINUED)
Interrupt control register I1 I13 Not used 0 1 0 I12 Interrupt valid waveform for INT pin selection bit (Note 2) 1 0 1 0 1 at reset : 00002 at power down : state retained R/W
This bit has no function, but read/write is enabled. Falling waveform ("L" level of INT pin is recognized with the SNZI0 instruction) Rising waveform ("H" level of INT pin is recognized with the SNZI0 instruction)
I11 I10
Not used Not used
This bit has no function, but read/write is enabled. This bit has no function, but read/write is enabled.
Pull-up control register PU0 PU03 PU02 PU01 PU00 Port P13 pull-up transistor control bit Port P12 pull-up transistor control bit Port P11 pull-up transistor control bit Port P10 pull-up transistor control bit 0 1 0 1 0 1 0 1
at reset : 00002
at power down : state retained
R/W
Pull-up transistor OFF, no key-on wakeup Pull-up transistor ON, key-on wakeup Pull-up transistor OFF, no key-on wakeup Pull-up transistor ON, key-on wakeup Pull-up transistor OFF, no key-on wakeup Pull-up transistor ON, key-on wakeup Pull-up transistor OFF, no key-on wakeup Pull-up transistor ON, key-on wakeup
Clock control register MR 0 MR3 System clock (STCK) selection bit 1 MR2 MR1 MR0 f(XCIN) oscillation circuit control bit f(XIN) oscillation circuit control bit Clock selection bit 0 1 0 1
at reset : 10002 MR0=0 f(XIN) MR0=1 f(XCIN) MR0=0 f(XIN)/4
at power down : state retained
R/W
MR0=1 f(XCIN)/4 f(XCIN) oscillation stop, ports D6 and D7 selected f(XCIN) oscillation enabled, ports D6 and D7 not selected Oscillation enabled Oscillation stop
f(XIN) 0 f(XCIN) 1 Notes 1: "R" represents read enabled, and "W" represents write enabled. 2: Depending on the input state of D5/INT pin, the external interrupt request flag EXF0 may be set to "1" when the contents of I12 is changed. Accordingly, set a value to bit 2 of register I1 and execute the SNZ0 instruction to clear the EXF0 flag after executing at least one instruction.
59
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
CONTROL REGISTERS (CONTINUED)
Carrier wave selection register C1 at reset : 01112 C13 C12 C11 C10 0 0 0 0 0 0 0 Carrier wave selection bits 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 at power down : 01112 Duty 1/3 1/2 1/4 1/2 1/2 W
Carrier wave frequency STCK/24 STCK/24 STCK/16 STCK/16 STCK/2 No carrier wave Not available "L" fixed STCK/12 STCK/12 STCK/8 STCK/8 STCK No carrier wave Not available "L" fixed 1/3 1/2 1/4 1/2 1/2
Carrier wave output control register C2 C20 Carrier wave output auto-control bit 0 1
at reset : 02
at power down : 02
W
Auto-control output by timer 1 is invalid Auto-control output by timer 1 is valid
Carrier wave generating control flag CR CR Carrier wave generating control 0 1
at reset : 02
at power down : 02
W
Carrier wave generating stop (SPCR instruction) Carrier wave generating start (STCR instruction)
Note: "W" represents write enabled.
60
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
CONTROL REGISTERS (CONTINUED)
LCD control register L1 L13 L12 Not used LCD on/off bit
L11
at reset : 00002 0 1 0 1
L10
at power down : state retained
R/W
This bit has no function, but read/write is enabled Off On Duty Not available 1/2 1/3 1/4 1/2 1/3 1/3 Bias 0 1 0 1
L11 LCD duty and bias selection bits L10
0 0 1 1
LCD control register L2 L23 L22 L21 L20 P23/SEG19 pin function switch bit P22/SEG18 pin function switch bit P21/SEG17 pin function switch bit P20/SEG16 pin function switch bit 0 1 0 1 0 1 0 1
at reset : 11112 SEG19 P23 SEG18 P22 SEG17 P21 SEG16 P20
at power down : state retained
W
General-purpose register V2 4-bit general-purpose register.
at reset : 00002
at power down : 00002
R/W
The data transfer between register A and this register is performed with the TV2A and TAV2 instructions. Note: "R" represents read enabled, and "W" represents write enabled.
61
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
ABSOLUTE MAXIMUM RATINGS
Symbol VDD VI VO VO VO Pd Topr Tstg Supply voltage Input voltage P0, P1, P2, RESET, XIN, XCIN Output voltage P0, P1, D Output voltage CARR, XOUT, XCOUT Output voltage SEG, COM Power dissipation Operating temperature range Storage temperature range Output transistors in cut-off state Parameter Conditions Ratings -0.3 to 7.0 -0.3 to VDD+0.3 -0.3 to VDD+0.3 -0.3 to VDD+0.3 -0.3 to VDD+0.3 300 -20 to 70 -40 to 125 Unit V V V V V mW C C
RECOMMENDED OPERATING CONDITIONS
(Mask ROM version:Ta = -20 C to 70 C, VDD = 2.2 V to 5.5 V, unless otherwise noted) (One Time PROM version:Ta = -20 C to 70 C, VDD = 2.5 V to 5.5 V, unless otherwise noted) Symbol Parameter Conditions f(XIN) 4.0 MHz, ceramic resonator, STCK=f(XIN)/4 f(XIN) 1.0 MHz, ceramic resonator, STCK=f(XIN) f(XIN) 4.0 MHz, ceramic resonator, VDD Supply voltage One Time PROM version STCK=f(XIN)/4 f(XIN) 1.0 MHz, ceramic resonator, STCK=f(XIN) f(XIN) 8.0 MHz, ceramic resonator, STCK=f(XIN)/4 f(XIN) 2.0 MHz, ceramic resonator, STCK=f(XIN) VRAM VSS VIH VIH VIH VIH VIL VIL VIL RAM back-up voltage Supply voltage "H" level input voltage P0, P1, P2 "H" level input voltage XIN "H" level input voltage RESET "H" level input voltage INT "L" level input voltage P0, P1, P2 "L" level input voltage XIN "L" level input voltage RESET "L" level input voltage INT 0.8VDD 0.7VDD 0.85VDD 0.8VDD 0 0 0 0 VDD=5.0 V VDD=3.0 V VDD=5.0 V VDD=3.0 V VDD=5.0 V VDD=3.0 V VDD=5.0 V VDD=3.0 V -30 -15 -15 -7 50 100 mA kHz RAM back-up 2.0 0 VDD VDD VDD VDD 0.3VDD 0.3VDD 0.3VDD 0.2VDD 10 4 5 2 mA 5.5 V V V V V V V V V V mA mA 4.5 5.5 2.5 5.5 V Limits Min. Typ. Max. Unit
Mask ROM version
2.2
5.5
VIL IOL(peak) "L" level peak output current P0, P1, D0-D7, CARR IOL(avg) "L" level average output current P0, P1, D0-D7, CARR (Note) IOH(peak) "H" level peak output current CARR IOH(avg) "H" level average output current CARR (Note) f(XCIN) clock frequency f(XCIN)
Quarts-crystal oscillator 32 VDD = 0 to 2.2 V Valid power supply rising time for Mask ROM version TPON One Time PROM version VDD = 0 to 2.5 V power-on reset circuit Note: The average output current is the average current value at the 100 ms interval.
s
62
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
ELECTRICAL CHARACTERISTICS
(Mask ROM version:Ta = -20 C to 70 C, VDD = 2.2 V to 5.5 V, unless otherwise noted) (One Time PROM version:Ta = -20 C to 70 C, VDD = 2.5 V to 5.5 V, unless otherwise noted) Symbol VOL VOH IIH IIL IOZ Parameter "L" level output voltage P0, P1, D0-D7, CARR, RESET "H" level output voltage CARR "H" level input current P0, P1, P2, RESET "L" level input current P1, P2 Output current at off-state D0-D7 IOL = 5 mA IOL = 2 mA IOH = -15 mA IOH = -7 mA VI = VDD (Note 1) VI = 0 V (Note 1) VO = VDD VDD = 5.0 V, f(XCIN) = 32 kHz, f(XIN) = 8 MHz STCK = f(XIN)/4 VDD = 5.0 V f(XCIN) = 32 kHz at active high-speed mode while LCD is operating f(XIN) = 1 MHz STCK = f(XIN) VDD = 3.0 V, f(XCIN) = 32 kHz, f(XIN) = 4 MHz STCK = f(XIN)/4 VDD = 3.0 V f(XCIN) = 32 kHz STCK = f(XIN) IDD Supply current (Note 2) at active low-speed mode while LCD is operating VDD = 5.0 V f(XIN) = stop f(XCIN) = 32 kHz VDD = 3.0 V f(XIN) = stop f(XCIN) = 32 kHz f(XIN) = stop f(XCIN) = 32 kHz Ta=25 C f(XIN) = stop f(XCIN) = 32 kHz f(XIN) = 1 MHz f(XIN) = 500 kHz STCK = f(XCIN)/4 STCK = f(XCIN) STCK = f(XCIN)/4 STCK = f(XCIN) VDD = 5.0 V VDD = 3.0 V VDD = 5.0 V 0.1 20 40 12 25 50 100 30 60 0.5 0.4 1.5 0.6 1.3 1.6 1.8 2.2 6.5 8 9 11 1.4 0.7 0.6 0.4 60 75 25 30 27.5 10 2.8 mA 1.4 1.2 0.8 140 180 2.5 f(XIN) = 2 MHz 2.3 -1 1 5.0 4.6 Test conditions VDD = 5.0 V VDD = 3.0 V VDD = 5.0 V VDD = 3.0 V 2.4 1.0 1 Limits Min. Typ. Max. 0.9 0.9 Unit V V
A A A
A
60 80 60 17.5 65 20 1.0 10 125 250 70 130
at clock operating mode while LCD is operating
A
at RAM back-up mode P0, P1 RPH Pull-up resistor value
RESET
VDD = 3.0 V f(XIN) = stop, f(XCIN) = stop, Ta = 25 C
f(XIN) = stop, f(XCIN) = stop VDD = 5.0 V, VI = 0 V VDD = 3.0 V, VI = 0 V VDD = 5.0 V, VI = 0 V VDD = 3.0 V, VI = 0 V VDD = 5.0 V VDD = 3.0 V VDD = 5.0 V VDD = 3.0 V VDD = 5.0 V VDD = 3.0 V VDD = 5.0 V VDD = 3.0 V Impedance between VLC3 and VSS
A
k k V V k k
INT VT+ - VT- Hysteresis
RESET
RCOM RSEG RVLC
COM output impedance SEG output impedance LCD power supply internal resistor value
600 1200 k 300 Ta=25 C (Note 3) Notes 1: In this case, the pull-up transistor of port P1 is turned off and the port P2 function is selected by software. 2: The current value includes the current dissipation of the LCD power supply internal resistor (RVLC). 3: VLC3=VDD.
63
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
BASIC TIMING DIAGRAM
Machine cycle
Mi Parameter System clock Port D output
Pin name
Mi+1
STCK D0-D7
Ports P0, P1 output
P00-P03 P10-P13
Ports P0, P1 and P2 input
P00-P03 P10-P13 P20-P23
Interrupt input
INT
64
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
BUILT-IN PROM VERSION
In addition to the mask ROM version, the 4551 Group has the programmable ROM version software compatible with mask ROM. The One Time PROM version has PROM which can only be written to and not be erased. The built-in PROM version has functions similar to those of the mask ROM version, but it has a PROM mode that enables writing to built-in PROM. Table 20 Product of built-in PROM version Product M34551E8-XXXFP 8192 words M34551E8FP 280 words PROM size (! 10 bits) RAM size (! 4 bits)
Table 20 shows the product of built-in PROM version. Figure 41 shows the pin configurations of built-in PROM version. The One Time PROM version has pin-compatibility with the mask ROM version.
Package
ROM type One Time PROM [shipped after writing] (shipped after writing and test in factory) One Time PROM [shipped in blank]
48P6S-A
PIN CONFIGURATION (TOP VIEW)
SEG8 SEG3 COM2 SEG7 SEG2 COM1 SEG6 SEG1 COM0 SEG5 SEG0 RESET SEG4 COM3
38 37 36 35 34 33 32 31 30 29 28 27 26 25
SEG9 SEG10 SEG11 SEG12 VSS SEG13 SEG14 SEG15 P20 / SEG16 P21 / SEG17
39 40 41 42 43 44 45 46 47 48 1 2 3 4 5 6 7 8 9 10 11 12 13 14
24 23 22 21
D7/XCOUT D6/XCIN CNVSS XOUT XIN VSS VDD CARR D5 / INT D4
M34551E8-XXXFP
20 19 18 17 16 15
P22 / SEG18
P23 / SEG19
P03
P02
P01
P00
P10
P11
P12
P13
D2
Outline 48P6S-A Fig. 41 Pin configuration of built-in PROM version
D0
D1
D3
65
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
(1) PROM mode The built-in PROM version has a PROM mode in addition to a normal operation mode. The PROM mode is used to write to and read from the built-in PROM. In the PROM mode, the programming adapter can be used with a general-purpose PROM programmer to write to or read from the built-in PROM as if it were M5M27C256K. Programming adapter is listed in Table 21. Contact addresses at the end of this book for the appropriate PROM programmer. * Writing and reading of built-in PROM Programming voltage is 12.5 V. Write the program in the PROM of the built-in PROM version as shown in Figure 42. (2) Notes on handling A high-voltage is used for writing. Take care that overvoltage is not applied. Take care especially at turning on the power. For the One Time PROM version shipped in blank, Mitsubishi Electric corp. does not perform PROM writing test and screening in the assembly process and following processes. In order to improve reliability after writing, performing writing and test according to the flow shown in Figure 43 before using is recommended. (Products shipped in blank: PROM contents is not written in factory when shipped)
Table 21 Programming adapter Microcomputer M34551E8-XXXFP, M34551E8FP Programming adapter PCA7414
Address 000016 1FFF16
1
1
1
D4 D3
D2
D1
D0
Low-order 5 bits
400016 5FFF16
1
1
1
D4 D3
D2
D1
D0
High-order 5 bits
7FFF16 Set "FF16" to the shaded area.
Fig. 42 PROM memory map
Writing with PROM programmer
Screening (Leave at 150 C for 40 hours) (Note)
Verify test with PROM programmer
Function test in target device Note: Since the screening temperature is higher than storage temperature, never expose the microcomputer to 150C exceeding 100 hours.
Fig. 43 Flow of writing and test of the product shipped in blank
66
MITSUBISHI MICROCOMPUTERS
4551 Group
SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER for INFRARED REMOTE CONTROL TRANSMITTER
Keep safety first in your circuit designs!
* Mitsubishi Electric Corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. Trouble with semiconductors may lead to personal injury, fire or property damage. Remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non-flammable material or (iii) prevention against any malfunction or mishap.
Notes regarding these materials
* * * These materials are intended as a reference to assist our customers in the selection of the Mitsubishi semiconductor product best suited to the customer's application; they do not convey any license under any intellectual property rights, or any other rights, belonging to Mitsubishi Electric Corporation or a third party. Mitsubishi Electric Corporation assumes no responsibility for any damage, or infringement of any third-party's rights, originating in the use of any product data, diagrams, charts or circuit application examples contained in these materials. All information contained in these materials, including product data, diagrams and charts, represent information on products at the time of publication of these materials, and are subject to change by Mitsubishi Electric Corporation without notice due to product improvements or other reasons. It is therefore recommended that customers contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor for the latest product information before purchasing a product listed herein. Mitsubishi Electric Corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. The prior written approval of Mitsubishi Electric Corporation is necessary to reprint or reproduce in whole or in part these materials. If these products or technologies are subject to the Japanese export control restrictions, they must be exported under a license from the Japanese government and cannot be imported into a country other than the approved destination. Any diversion or reexport contrary to the export control laws and regulations of Japan and/or the country of destination is prohibited. Please contact Mitsubishi Electric Corporation or an authorized Mitsubishi Semiconductor product distributor for further details on these materials or the products contained therein.
*
* *
*
(c) 1997 MITSUBISHI ELECTRIC CORP. KI-9711 Printed in Japan (ROD) II New publication, effective Nov. 1997. Specifications subject to change without notice.
REVISION DESCRIPTION LIST
Rev. No. 1.0 First Edition
4551 GROUP DATA SHEET
Revision Description Rev. date 971130
(1/1)


▲Up To Search▲   

 
Price & Availability of M34551E8-XXXFP

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X